-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(sns): add fromTopicName
api to import a sns topic via the topic name
#26635
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
fromTopicName
api to import a sns topic via the topic namefromTopicName
api to import a sns topic via the topic name
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MiguelBebensee, thanks for opening this PR. We cannot take a look until the build succeeds. See the current error:
aws-cdk-lib: FAIL aws-sns/test/sns.test.js
aws-cdk-lib: ● Topic › fromTopicName
aws-cdk-lib: expect(received).toEqual(expected) // deep equality
aws-cdk-lib: Expected: "arn:aws:sns:*:123456789012:my_corporate_topic"
aws-cdk-lib: Received: "arn:${Token[AWS.Partition.11]}:sns:${Token[AWS.Region.12]}:${Token[AWS.AccountId.8]}:my_corporate_topic"
aws-cdk-lib: �[0m �[90m 359 |�[39m �[90m// THEN�[39m�[0m
aws-cdk-lib: �[0m �[90m 360 |�[39m expect(imported�[33m.�[39mtopicName)�[33m.�[39mtoEqual(�[32m'my_corporate_topic'�[39m)�[33m;�[39m�[0m
aws-cdk-lib: �[0m�[31m�[1m>�[22m�[39m�[90m 361 |�[39m expect(imported�[33m.�[39mtopicArn)�[33m.�[39mtoEqual(�[32m'arn:aws:sns:*:123456789012:my_corporate_topic'�[39m)�[33m;�[39m�[0m
aws-cdk-lib: �[0m �[90m |�[39m �[31m�[1m^�[22m�[39m�[0m
aws-cdk-lib: �[0m �[90m 362 |�[39m expect(imported�[33m.�[39mfifo)�[33m.�[39mtoEqual(�[36mfalse�[39m)�[33m;�[39m�[0m
aws-cdk-lib: �[0m �[90m 363 |�[39m�[0m
aws-cdk-lib: �[0m �[90m 364 |�[39m })�[33m;�[39m�[0m
aws-cdk-lib: at Object.toEqual (aws-sns/test/sns.test.ts:361:31)
aws-cdk-lib: ● Topic › fromTopicName fifo
aws-cdk-lib: expect(received).toEqual(expected) // deep equality
aws-cdk-lib: Expected: "arn:aws:sns:*:123456789012:mytopic.fifo"
aws-cdk-lib: Received: "arn:${Token[AWS.Partition.11]}:sns:${Token[AWS.Region.12]}:${Token[AWS.AccountId.8]}:mytopic.fifo"
aws-cdk-lib: �[0m �[90m 373 |�[39m �[90m// THEN�[39m�[0m
aws-cdk-lib: �[0m �[90m 374 |�[39m expect(imported�[33m.�[39mtopicName)�[33m.�[39mtoEqual(�[32m'mytopic.fifo'�[39m)�[33m;�[39m�[0m
aws-cdk-lib: �[0m�[31m�[1m>�[22m�[39m�[90m 375 |�[39m expect(imported�[33m.�[39mtopicArn)�[33m.�[39mtoEqual(�[32m'arn:aws:sns:*:123456789012:mytopic.fifo'�[39m)�[33m;�[39m�[0m
aws-cdk-lib: �[0m �[90m |�[39m �[31m�[1m^�[22m�[39m�[0m
aws-cdk-lib: �[0m �[90m 376 |�[39m expect(imported�[33m.�[39mfifo)�[33m.�[39mtoEqual(�[36mtrue�[39m)�[33m;�[39m�[0m
aws-cdk-lib: �[0m �[90m 377 |�[39m })�[33m;�[39m�[0m
aws-cdk-lib: �[0m �[90m 378 |�[39m�[0m
aws-cdk-lib: at Object.toEqual (aws-sns/test/sns.test.ts:375:31)
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
@@ -21,6 +21,26 @@ const topic = new sns.Topic(this, 'Topic', { | |||
|
|||
Note that FIFO topics require a topic name to be provided. The required `.fifo` suffix will be automatically generated and added to the topic name if it is not explicitly provided. | |||
|
|||
## Import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use the term "import". This is confusing because it doesn't actually import resources into the stack (which people might otherwise think it does).
We prefer the term "referencing existing resources".
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
The pull request linter fails with the following errors:
PRs must pass status checks before we can provide a meaningful review. If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing |
This pull request extends the SNS topic by importing via the topic name. In addition, the documentation of the API is improved.
There is no link to an issue.