having a huge problem trying to get an sns topic, ...
# aws
n
having a huge problem trying to get an sns topic, and then set the topic & topic arn for creating a subscription, has anyone else dealt with SNS topics & subscriptions?
i’ve tried
Copy code
const sometopic = pulumi.output(aws.sns.getTopic({ name: 'sometopic-3ce3de0' }, { async: true }))

const topicArn = sometopic.apply(o => o.arn)
and also:
Copy code
const someTopic = aws.sns.Topic.get('sometopic', '3ce3de0')
const topicArn = someTopic.apply(stack => pulumi.output(stack.arn))
but its not giving me the results I’m expecting of
Copy code
export declare type ARN = string;
its showing me crap like
Copy code
topicArn OutputImpl {
      __pulumiOutput: true,
      isKnown: Promise { <pending> },
      isSecret: Promise { false },
      resources: [Function],
      allResources: [Function],
      promise: [Function],
      toString: [Function],
      toJSON: [Function] }
f
I assume you’re trying to do something like this?
Copy code
const sometopic = pulumi.output(aws.sns.getTopic({ name: 'sometopic' });
const subscription = new aws.sns.TopicSubscription("subscription", {
    topic: sometopic.arn
    // ...
});
Anything you’re getting stuck on?
n
Yeah that looks like it. But this is for the subscription permissions portion. Might work the same.