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

Missing builds/3a3db.......plan.json #234

Open
1 task done
alexmbird opened this issue Sep 4, 2024 · 0 comments
Open
1 task done

Missing builds/3a3db.......plan.json #234

alexmbird opened this issue Sep 4, 2024 · 0 comments

Comments

@alexmbird
Copy link

Description

In trying to update the module to take advantage of this fix I've run into a new problem.

The bug seems to have been introduced between 6.1 (I reverted to this, works fine) and 6.4 (has the error).

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

Versions

  • Module version 6.5.0
  • Terraform version: 1.5.5
  • Provider version(s):
    $ terraform providers -version
    + provider registry.terraform.io/hashicorp/aws v5.46.0
    + provider registry.terraform.io/hashicorp/local v2.5.1
    + provider registry.terraform.io/hashicorp/null v3.2.2
    + provider registry.terraform.io/hashicorp/random v3.6.1
    

Reproduction Code [Required]

module "notify_slack" {
  create = var.ops_notification_slack_channel != null

  source  = "terraform-aws-modules/notify-slack/aws"
  version = "~> 6.5.0"

  sns_topic_name   = aws_sns_topic.devops_notifications.name
  create_sns_topic = false

  slack_webhook_url = "https://my.webhook.url"
  slack_channel     = var.ops_notification_slack_channel
  slack_username    = var.ops_notification_slack_username

  lambda_function_name = "myname-notify-slack"
  lambda_description   = "Proxy alerts from SNS into a Slack channel"
  iam_role_name_prefix = "myname-notify-slack"
}

Steps to reproduce the behavior:

  1. Starting from an older version (I was on 6.0.x, not 6.4 as wrongly stated), update to 6.5.
  2. Get a fresh checkout of the Terraform tree
  3. terraform init / terraform apply

Expected behavior

No-op as the resources already exist. Previous bugfixes mean the archive will no longer be updated.

Actual behavior

Fails with:

module.notify_slack.module.lambda.null_resource.archive[0] (local-exec): Executing: ["python3" ".terraform/modules/notify_slack.lambda/package.py" "build" "--timestamp" "1725443010840735000" "builds/3a3dbc28c8db81a5ee00eaba4b0dc2b34aad01ec97c9806855a5f378fe94854e.plan.json"]
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec): Traceback (most recent call last):
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):   File "/builds/infrastructure/infra-environments/prod/.terraform/modules/notify_slack.lambda/package.py", line 1636, in <module>
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):     main()
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):   File "/builds/infrastructure/infra-environments/prod/.terraform/modules/notify_slack.lambda/package.py", line 1632, in main
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):     exit(args.command(args))
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):          ^^^^^^^^^^^^^^^^^^
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):   File "/builds/infrastructure/infra-environments/prod/.terraform/modules/notify_slack.lambda/package.py", line 1503, in build_command
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):     with open(args.build_plan_file) as f:
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec):          ^^^^^^^^^^^^^^^^^^^^^^^^^^
module.notify_slack.module.lambda.null_resource.archive[0] (local-exec): FileNotFoundError: [Errno 2] No such file or directory: 'builds/3a3dbc28c8db81a5ee00eaba4b0dc2b34aad01ec97c9806855a5f378fe94854e.plan.json'
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

No branches or pull requests

1 participant