-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 to SQS incompetency and incomplete documentation #5973
Comments
the terraform documentation has to be changed, as it doesn't support email protocol in SNS, so we are bound to use SQS. or we need to hard code ARN of working SNS and SQS in to terraform variable file. |
Thanks for reporting the issue here. Apologies that the documentation isn't up to par in this area. Do you know what the changes to the docs should be? I haven't worked with these resources much and would love to be able to get them fixed up. We would love for you to open a PR with the suggested changes to help make it better Thanks Paul |
the most easy fix is to ask users to login to their AWS SQS console, and make a subscribe from within SQS console page (this is different from the subscribe on AWS SNS console), after running "terraform apply" command. If there is an SNS topic applied prior defining SQS queue, you can change
to
however, in reality, most of time, we just use SNS with email protocol. we SQS with other applications like ELK. Terraform doesn't support SNS with email protocol directly, but we can use aws_cloudformation_stack resource to set up SNS via AWS cloudformation. |
maybe related to #3549 |
Seems related to #4157 |
I commented in #6909 with an example that shows how to create SNS topics and SQS queues that are subscribed to each other without requiring any manual interaction in the AWS Console or the API. Key for success are the two "aws_iam_policy_document" data items which make sure that the SNS topic can post messages to the SQS queue as well as the SQS queue can subscribe to the SNS topic. If you don't require cross region / cross account SNS to SQS subscriptions than you can simplify the providers section to a single provider. I agree with @jianhuawuchn that the documentation requires improvement. Do you think it would make sense to put my whole example from #6909 into the documentation? |
I added #9838 to update documentation with notes and examples about cross account / region SNS topic to SQS queue subscription. |
Hi Friends, does the PR added by @AndHei close this issue? |
Hello! I'm going through |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
following the URL of
https://www.terraform.io/docs/providers/aws/r/sns_topic_subscription.html
does not get the job "sending message from SNS to SQS done". As up to this stage, there is no permission set aside in SQS queue which allows to receive message from SNS.
see this link for reference http://docs.aws.amazon.com/sns/latest/dg/SendMessageToSQS.html#SendMessageToSQS.arn
we could use "policy" argument in ws_sqs_queue to achieve our intention, however, since we could not use variable reference in JSON format policy, after setting up SNS and SQS via terraform tool, we had to login to AWS SQS console, and do permission changes on the permission tab.
The text was updated successfully, but these errors were encountered: