-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formatArn helper can't generate valid SQS queue ARNs #26958
Comments
This works const arn = this.formatArn({
service: 'sqs',
resource: 'myqueuename',
})
new cdk.CfnOutput(this, 'QueueArn', { value: arn })
|
The docstring for
Could this be made more clear somehow? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
This could definitely be made more clear by documenting how ARNs are structured for all services in a central place. Or better yet, update |
I'm not super sure what you mean by this exactly
If you have an idea of how the user contract for this could improve, feel free to create a feature request with a proposed solution 🙂 |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Describe the bug
When using
Stack.of(this).formatArn()
it doesn't appear possible to generate valid SQS queue ARNs. Queue ARNs don't contain a resource type at all, and there's noarnFormat
for this particular use case.Expected Behavior
formatArn()
should be able to generate valid SQS queue ARNs.Current Behavior
The closest I can get is something like this:
Which outputs e.g.
:sqs:us-east-1:000000000000::my-queue.fifo
(note the double::
before the queue name).The actual ARN is
arn:aws:sqs:us-east-1:000000000000:my-queue.fifo
.Reproduction Steps
Same as above:
Possible Solution
Really I think the best solution would be to deprecate (or at least make optional) the
arnFormat
parameter, and haveformatArn()
automatically deal with this based on the value ofservice
.But at the very least there should be an
arnFormat
for this use case.Additional Information/Context
No response
CDK CLI Version
2.92.0 (build bf62e55)
Framework Version
No response
Node.js Version
16
OS
MacOS
Language
Typescript
Language Version
4.9.5
Other information
No response
The text was updated successfully, but these errors were encountered: