Skip to content
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

[Bug]: aws_sns_topic_subscription import should fail if topic does not contain subscription with given subscription id #31013

Open
applike-ss opened this issue Apr 27, 2023 · 1 comment
Labels
bug Addresses a defect in current functionality. service/sns Issues and PRs that pertain to the sns service.

Comments

@applike-ss
Copy link
Contributor

Terraform Core Version

1.2.8

AWS Provider Version

4.46.0

Affected Resource(s)

  • aws_sns_topic_subscription

Expected Behavior

The provider should fail to import an aws_sns_topic_subscription if the topic does not have a subscription with the given ID.

Actual Behavior

The provider imports an aws_sns_topic_subscription if both topic arn and subscription id exist, however they don't have to belong to each other currently to be imported successfully.

Relevant Error/Panic Output Snippet

-

Terraform Configuration Files

resource "aws_sns_topic_subscription" "subscription" {
  protocol  = "lambda"
  endpoint  = data.aws_lambda_function.function.arn
  topic_arn = data.aws_sns_topic.source.arn

  endpoint_auto_confirms = true
}

Steps to Reproduce

  • Create two topics
  • Create a lambda function
  • Create a trigger for the function to topic 1
  • Import the sns subscription with arn of topic 2 and the subscription id gathered from topic 1

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@applike-ss applike-ss added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Apr 27, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/sns Issues and PRs that pertain to the sns service. label Apr 27, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/sns Issues and PRs that pertain to the sns service.
Projects
None yet
Development

No branches or pull requests

2 participants