modern-diamond-82589
02/21/2019, 9:38 PMaws.lambda.Function
instance to an SNS topic that was created external to a pulumi stack? The topic ARN would be passed in as a config parameter; i.e. an instance of aws.sns.Topic
is not immediately available.aws.sns.TopicSubscription
is where I started my search, but the problem with it is that aws.sns.TopicSubscriptionArgs.topic
is required to be of type pulumi.Input<aws.sns.Topic>
. Right now I am wishing it could be of type pulumi.Input<aws.sns.Topic | aws.ARN>
.lemon-spoon-91807
02/21/2019, 10:01 PMmodern-diamond-82589
02/21/2019, 10:02 PMname
, is arbitrary. The second arg, id
, would be the ARN. But I'm getting an error: InvalidParameter: Invalid parameter: TopicArn
. I suspect that I need to provide a custom provider to aws.sns.Topic.get()
because the topic is in a different region.lemon-spoon-91807
02/21/2019, 10:11 PMmodern-diamond-82589
02/21/2019, 10:45 PMaws.sns.Topic.get()
works when the topic is found in the same region as the stack's default.aws.Provider
representing the foreign region is supplied to both aws.sns.Topic.get()
and new aws.sns.TopicSubscription()
.lemon-spoon-91807
02/22/2019, 2:26 AM