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 Lambda subscription endpoint is wrong #238

Open
1 task done
ioancatana opened this issue Oct 3, 2024 · 0 comments · May be fixed by #240
Open
1 task done

SNS Lambda subscription endpoint is wrong #238

ioancatana opened this issue Oct 3, 2024 · 0 comments · May be fixed by #240

Comments

@ioancatana
Copy link

ioancatana commented Oct 3, 2024

Description

Please provide a clear and concise description of the issue you are encountering, and a reproduction of your configuration (see the examples/* directory for references that you can copy+paste and tailor to match your configs if you are unable to copy your exact configuration). The reproduction MUST be executable by running terraform init && terraform apply without any further changes.

If your request is for a new feature, please use the Feature request template.

  • ✋ I have searched the open/closed issues and my issue is not listed.

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

  • Module version [Required]: 6.4.1 -> 6.5.0

  • Terraform version: v1.6.6

  • Provider version(s):
    provider registry.terraform.io/hashicorp/aws v5.69.0
    provider registry.terraform.io/hashicorp/external v2.3.4
    provider registry.terraform.io/hashicorp/local v2.5.2
    provider registry.terraform.io/hashicorp/null v3.2.3

Reproduction Code [Required]

-/+ resource "aws_sns_topic_subscription" "sns_notify_slack" {
      ~ arn                             = "arn:aws:sns:eu-west-1:123456:uat-alerts:c6ce03bb-e013-4999-9dbf-708122d8f554" -> (known after apply)
      ~ confirmation_was_authenticated  = true -> (known after apply)
      ~ endpoint                        = "arn:aws:lambda:eu-west-1:123456:function:alerts-slack-notifier:3" -> "arn:aws:lambda:eu-west-1:123456:function:alerts-slack-notifier" # forces replacement
      + filter_policy_scope             = (known after apply)
      ~ id                              = "arn:aws:sns:eu-west-1:123456:alerts:c6ce03bb-e013-4999-9dbf-708122d8f554" -> (known after apply)
      ~ owner_id                        = "123456" -> (known after apply)
      ~ pending_confirmation            = false -> (known after apply)
        # (5 unchanged attributes hidden)
    }

Steps to reproduce the behavior:
The bug was introduced on this commit: e95cde8

Upgrade from 6.4.0 to 6.4.1 or 6.5.0

No Yes Upgrade from 6.4.0 to newer version, and check Lambda code, on Configuration, Triggers, and will see the error:

A subscription for arn:aws:lambda:eu-west-1:123456:function:alerts-slack-notifier on the topic uat-alerts could not be found.

Expected behavior

Endpoint of Subscriptions needs to be without the version: "arn:aws:lambda:eu-west-1:123456:function:alerts-slack-notifier"

Actual behavior

"arn:aws:lambda:eu-west-1:123456:function:alerts-slack-notifier:3"

Terminal Output Screenshot(s)

Additional context

@AlexTraxinger AlexTraxinger linked a pull request Oct 14, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant