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

sns topic subscription invalid or unknown key: filter policy #4538

Closed
A114397 opened this issue May 14, 2018 · 3 comments
Closed

sns topic subscription invalid or unknown key: filter policy #4538

A114397 opened this issue May 14, 2018 · 3 comments
Labels
bug Addresses a defect in current functionality. service/sns Issues and PRs that pertain to the sns service.
Milestone

Comments

@A114397
Copy link

A114397 commented May 14, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

I am currently running v0.9.11; updating the code-base to work with > v0.11 is a work in progress...

Affected Resource(s)

  • aws_sns_topic_subscription

Terraform Configuration Files

resource "aws_sns_topic_subscription" "sns-topic" {
  topic_arn = "arn:aws:sns:${var.region}:${var.account_number}:${var.sns_topic_name}"
  protocol  = "sqs"
  endpoint  = "${aws_sqs_queue.sqs-queue.arn}"

  filter_policy = <<EOF
  {
    "key": [{"prefix":"${var.prefix_filter}"}]
  }
  EOF
}

Terraform Plan

1 error(s) occurred:

* module.sns_asg.module.sqs_queue.aws_sns_topic_subscription.sns-topic: : invalid or unknown key: filter_policy

Expected Behavior

  • according the to docs this should deploy an sns topic subscription with a filter policy
  • I'm at a loss for why this error occurs

Actual Behavior

  • Receive an error message of invalid or unknown key: filter_policy
  • I can't find any documentation around this error
  • Removing the filter policy from the sns_topic_subscription code plans and applies as intended

References

I've checked here and the associated links for some help understanding the problem. I've checked my provider; it includes the updates referenced.

@edward-agarwala
Copy link

👍

@bill-rich bill-rich added the bug Addresses a defect in current functionality. label May 15, 2018
@bflad bflad added the service/sns Issues and PRs that pertain to the sns service. label May 18, 2018
@bflad bflad added this to the v1.9.0 milestone May 18, 2018
@bflad
Copy link
Contributor

bflad commented May 18, 2018

Terraform 0.10 split providers like AWS, Google, etc. away from the core code and versioning, announcement here. Using the filter_policy functionality will require upgrading to at least 0.10+ of Terraform core along with at least version 1.9.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading the provider.

@bflad bflad closed this as completed May 18, 2018
@ghost
Copy link

ghost commented Apr 5, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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

4 participants