brave-angle-33257
10/23/2019, 6:50 PMerror: Running program '/data/pulumi/infra/aws/company/company-step-functions' failed with an unhandled exception:
TSError: ⨯ Unable to compile TypeScript:
index.ts(53,5): error TS2322: Type 'Output<string>' is not assignable to type 'Input<Topic>'.
code is:
const success_topic_subscription_name = `${company}-collector-${env}-success-email`
const success_topic_subscription = new aws.sns.TopicSubscription(success_topic_subscription_name, {
endpoint: "<https://global.sns-api.chatbot.amazonaws.com>",
protocol: "HTTPS",
topic: success_topic.arn,
});
const userUpdatesSqsTarget = new aws.sns.TopicSubscription("userUpdatesSqsTarget", {
endpoint: "arn:aws:sqs:us-west-2:432981146916:queue-too",
protocol: "sqs",
topic: "arn:aws:sns:us-west-2:432981146916:user-updates-topic",
});
handsome-actor-1155
10/23/2019, 6:58 PMsuccess_topic
?brave-angle-33257
10/23/2019, 7:01 PMconst success_topic = new aws.sns.Topic("success_topic", {
name: topic_success_name`,
});
handsome-actor-1155
10/23/2019, 7:06 PMbrave-angle-33257
10/23/2019, 7:06 PMhandsome-actor-1155
10/23/2019, 7:08 PMsuccess_topic
as type Topic
const success_topic: Topic = new aws.sns.Topic("success_topic", {
name: topic_success_name`,
});
aws.sns.Topic
brave-angle-33257
10/23/2019, 7:13 PMconst topic_success_name = `success2`
const success_topic = new aws.sns.Topic(topic_success_name, {
name: topic_success_name
});
const success_topic_subscription_name = `success-email2`
const success_topic_subscription = new aws.sns.TopicSubscription(success_topic_subscription_name, {
endpoint: "<https://global.sns-api.chatbot.amazonaws.com>",
protocol: "HTTPS",
topic: success_topic.arn
});
` error: Running program '/data/pulumi/infra/aws/company/company-step-functions' failed with an unhandled exception:
TSError: ⨯ Unable to compile TypeScript:
index.ts(48,5): error TS2322: Type 'Output<string>' is not assignable to type 'Input<Topic>'.
Type 'Output<string>' is not assignable to type 'OutputInstance<Topic>'.
Types of property 'apply' are incompatible.
Type '{ <U>(func: (t: string) => Promise<U>): Output<U>; <U>(func: (t: string) => OutputInstance<U>): Output<U>; <U>(func: (t: string) => U): Output<U>; }' is not assignable to type '{ <U>(func: (t: Topic) => Promise<U>): Output<U>; <U>(func: (t: Topic) => OutputInstance<U>): Output<U>; <U>(func: (t: Topic) => U): Output<U>; }'.
Types of parameters 'func' and 'func' are incompatible.
Types of parameters 't' and 't' are incompatible.
Type 'string' is not assignable to type 'Topic'.
const success_topic:aws.sns.Topic = new aws.sns.Topic(topic_success_name, {
name: topic_success_name
});
const topic_success_name = `success2`
const success_topic = new aws.sns.Topic(topic_success_name, {
name: topic_success_name
});
const success_topic_subscription_name = `success-email2`
const success_topic_subscription = new aws.sns.TopicSubscription(success_topic_subscription_name, {
endpoint: "<https://global.sns-api.chatbot.amazonaws.com>",
protocol: "HTTPS",
topic: success_topic
});
$ pulumi version
v1.3.4
$ pulumi plugin ls
NAME KIND VERSION SIZE INSTALLED LAST USED
aws resource 1.6.0 220 MB n/a 11 minutes ago
handsome-actor-1155
10/23/2019, 7:24 PMarn
part works for mebrave-angle-33257
10/23/2019, 7:28 PMhandsome-actor-1155
10/23/2019, 7:28 PMbrave-angle-33257
10/23/2019, 7:29 PMhandsome-actor-1155
10/23/2019, 7:30 PM