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

endpoint_auto_confirms and confirmation_timeout_in_minutes for sqs endpoints #166

Closed
hashibot opened this issue Jun 13, 2017 · 3 comments
Closed
Labels
bug Addresses a defect in current functionality.

Comments

@hashibot
Copy link

This issue was originally opened by @scheffield as hashicorp/terraform#6652. It was migrated here as part of the provider split. The original body of the issue is below.


Hi,

I recently upgraded to version 0.6.16. Now I get changes for my sns subscriptions which look as follows:

~ aws_sns_topic_subscription.foo-subscription
    confirmation_timeout_in_minutes: "" => "1"
    endpoint_auto_confirms:          "" => "false"

The protocol I'm subscribing to is sqs. From what I understand (reading the documentation: http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.prepare) auto confirm makes only sense for http/https endpoints. Applying the changes affects the terraform state but not the actual subscription. I recon the change was introduced by hashicorp/terraform#4711

Please find my actual configuration and other infos below.

Terraform Version

Terraform v0.6.16

Affected Resource(s)

  • aws_sns_topic_subscription

Terraform Configuration Files

resource "aws_sns_topic" "foo" {
  name = "foo-topic"
}

resource "aws_sns_topic_subscription" "foo-subscription" {
  topic_arn = "arn:aws:sns:us-east-1:************:foo"
  protocol = "sqs"
  endpoint = "arn:aws:sqs:us-east-1************:foo-queue"
  raw_message_delivery = true
  depends_on = ["aws_sns_topic.foo"]
}
@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@Ninir
Copy link
Contributor

Ninir commented Aug 28, 2017

Hi @scheffield

This has been fixed since 0.6.16.
Closing this one since the issue does not exist anymore.
If, however, you still encounter any issue related to this, please tell us so that we reopen & discuss together.

Thanks!

@Ninir Ninir closed this as completed Aug 28, 2017
@emre141
Copy link

emre141 commented Mar 14, 2019

Hi,
I have import aws_sns_topic_subscription with queue using terragrunt import to the s3 backend state.
Below Output Show me to import successfully

Terraform Configuration File

data "aws_caller_identity" "current" {}

resource "aws_sns_topic_subscription" "aws_sns_topic_subscription_to_sqs" {
count = "${var.subscribe_sqs_to_topic ? 1 : 0}"
topic_arn = "arn:aws:sns:eu-central-1:${var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id}:${var.sns_topic}"
protocol = "sqs"
endpoint = "${aws_sqs_queue.queue.arn}"
raw_message_delivery = true
filter_policy = <<EOF
${var.filter_policy}
EOF
}

Terraform and Terragrunt version

Terraform v0.11.11
terragrunt version v0.18.0
provider "aws" (2.1.0)...

Terraform Import Resut

aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Importing from ID "arn:aws:sns:eu-central-1::foo-topic:"...
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Import complete!
Imported aws_sns_topic_subscription (ID: arn:aws:sns:eu-central-1::foo-topic:
)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Refreshing state... (ID: arn:aws:sns:eu-central-1::A...c:)
Import successful!
The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

S3 backend bucket terraform.state file look like

resources": {
"aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs": {
"type": "aws_sns_topic_subscription",
"depends_on": [],
"primary": {
"id": "arn:aws:sns:eu-central-1::foo-topic:",
"attributes": {
"arn": "arn:aws:sns:eu-central-1::foo-topic:",
"delivery_policy": "",
"endpoint": "arn:aws:sqs:eu-central-1:
:foo-queue",
"filter_policy": "",
"id": "arn:aws:sns:eu-central-1:
:foo-topic***",
"protocol": "sqs",
"raw_message_delivery": "true",
"topic_arn": "arn:aws:sns:eu-central-1:********:foo-topic"
},
"meta": {},
"tainted": false
},
"deposed": [],
"provider": "provider.aws"

When i run terragrunt plan below update-in-place output

~ update in-place

Terraform will perform the following actions:

~ aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs
confirmation_timeout_in_minutes: "" => "1"
endpoint_auto_confirms: "" => "false"
filter_policy: "" => "{}"

After when i run terragrunt apply i have got below mofiying output

aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:, 57m40s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 57m50s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 58m0s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 58m10s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 58m20s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 58m30s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 58m40s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 58m50s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
, 59m0s elapsed)
aws_sns_topic_subscription.aws_sns_topic_subscription_to_sqs: Still modifying... (ID: arn:aws:sns:eu-central-1::A...c:
****************, 59m10s elapsed)

@ghost
Copy link

ghost commented Mar 31, 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 Mar 31, 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.
Projects
None yet
Development

No branches or pull requests

3 participants