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

aws_sqs_queue_policy cannot have sourceArn from multiple regions #19527

Closed
pz325 opened this issue Dec 1, 2018 · 2 comments
Closed

aws_sqs_queue_policy cannot have sourceArn from multiple regions #19527

pz325 opened this issue Dec 1, 2018 · 2 comments

Comments

@pz325
Copy link

pz325 commented Dec 1, 2018

Following #12003, I am trying to set a SQS to subscribe to more than one SNS. But in our setup, the SQS nees to subscribe the SNSes from different regions. e.g. the inbound SQS needs to subscribe one SNS from the region eu-west-1, and another SNS from te region us-east-1.

Please find the following scripts, inputs and errors. Though the error does not say directly it's region related, we tested script with multiple SNSes from the same region, which works without issue.

I am not sure it's a bug. Anything I can do to make it work? Perhaps I should do it in another way?

Terraform Version

Terraform v0.11.10

Terraform Configuration Files

resource "aws_sqs_queue_policy" "inbound" {
  queue_url = "${aws_sqs_queue.inbound.id}"

  policy = <<POLICY
{
  "Version": "2012-10-17",
  "Id": "article-pipeline-${aws_sqs_queue.inbound.name}-policy",
  "Statement": [
    {
      "Sid": "First",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "sqs:SendMessage",
      "Resource": "${aws_sqs_queue.inbound.arn}",
      "Condition": {
        "ArnEquals": {
          "aws:SourceArn": ${jsonencode(var.inbound_sns_arns)}
        }
      }
    }
  ]
}
POLICY
}

where inbound_sns_arns is ["arn:aws:sns:eu-west-1:334962147612:new_rss_article", "arn:aws:sns:us-east-1:334962147612:new_cc_news_article"]

Debug Output

Crash Output

Error: Error applying plan:
1 error(s) occurred:
* module.intelligent_filter.aws_sns_topic_subscription.inbound[1]: 1 error(s) occurred:
* aws_sns_topic_subscription.inbound.1: Error creating SNS topic: InvalidParameter: Invalid parameter: TopicArn
        status code: 400, request id: 065243ff-a68f-5f86-9b28-1785d4f6a9a1

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

References

@pz325 pz325 changed the title aws_sqs_queue_policy cannot have sourceArn of multiple regions aws_sqs_queue_policy cannot have sourceArn from multiple regions Dec 1, 2018
@ghost ghost closed this as completed Dec 1, 2018
@ghost
Copy link

ghost commented Dec 1, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#6677 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#6677.

@ghost
Copy link

ghost commented Mar 30, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants