-
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
(sns): fifo topic construct doesn't append .fifo to the topic name #12386
Comments
I've made the minimal reproduction more complete. Would love to contribute with a fix but I'm not sure how to proceed. I'm looking at the SQS implementation but I don't understand the flow of the cloud formation naming in relation to topic names, physical names, etc... |
If you don't pass a name, does it work? Cause CloudFormation should add it if a name is not given. |
@NetaNir deliverately passing an empty topicName as follows: new sns.Topic(this, "MyTopic", {
fifo: true,
topicName: "",
}); Ends up with error too:
|
That's not an empty name. What happens if you don't pass a name at all? |
If you mean not passing I just removed the comment in the reproduction steps for clarification purposes. |
Hi @NetaNir, the integration test explicitly passes in topic name Correct me if I'm wrong, but I don't think the CDK code holds any custom logic for auto-generating a topic name if it's not provided in the props? Certainly I didn't add anything specific to FIFO. Is it possible this is a CloudFormation bug, if its default behavior is to generate a name and we're finding this to be invalid for FIFO topics? |
So currently the API is broken, if a name is not passed- the queue creation will fail. And if a name is passed but does not have the This is not a great customer experience and we should make it better, the minimum is to throw an error if The better experience will be to append the |
Agreed, that sounds like a good step forward until the underlying problem is resolved. Happy to open a PR for this. The underlying bug is already documented in the CloudFormation roadmap |
Hi @NetaNir, @MrArnoldPalmer, that's a PR opened for review now. Feedback welcome. |
Require topicName property for FIFO SNS topics as a workaround to [issue 681](aws-cloudformation/cloudformation-coverage-roadmap#681) reported in the CloudFormation coverage roadmap. Also adding additional logic to append '.fifo' to FIFO topic name if not provided explicitly by the user. Fixes #12386 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
The SNS FIFO topics are failing to deploy because the topic name is missing
.fifo
at the end.Reproduction Steps
Create a minimal cdk app with the following SNS FIFO topic and deploy it:
What did you expect to happen?
The SNS topic should append
.fifo
to the topic name iftopic: true
and.fifo
is not present already.What actually happened?
The deploy failed:
Environment
Other
It works if you manually set the topicName to include
.fifo
at the end, like this:This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: