Anit Aggarwal
Anit Aggarwal

Reputation: 105

How to reference an SQS queue which has not been created yet in CloudFormation template

I have a defined queue resource in my cloud formation template. Now. in the same template, I am defining a queue policy in which I want to allow certain action on the queue. For the attribute "Resource" in the policy statement, how can I reference the Queue Name / arn since it hasn't been created yet ?

Upvotes: 2

Views: 801

Answers (1)

Marcin
Marcin

Reputation: 238747

You can get ARN from queue's return values. Depending on exactly how you are defining your policy it could be:

!GetAtt <your-queue-resource>.Arn

Upvotes: 2

Related Questions