"Missing required argument" error with version 4.12.0
petur opened this issue · 3 comments
Description
After upgrading to version 4.12.0, using this module fails with the error "Missing required argument".
- ✋ I have searched the open/closed issues and my issue is not listed.
Versions
-
Module version [Required]: 4.12.0
-
Terraform version:
Terraform v1.4.0
on linux_amd64 -
Provider version(s):
- provider registry.terraform.io/hashicorp/aws v4.56.0
- provider registry.terraform.io/hashicorp/external v2.2.3
- provider registry.terraform.io/hashicorp/local v2.3.0
- provider registry.terraform.io/hashicorp/null v3.2.1
Reproduction Code [Required]
module "sns_slack_lambda" {
source = "terraform-aws-modules/lambda/aws"
function_name = "sns-slack"
description = "Forwards SES notifications to Slack"
handler = "sns_slack.lambda_handler"
runtime = "python3.8"
attach_policy_json = true
policy_json = data.aws_iam_policy_document.sns_slack_lambda.json
source_path = "${path.module}/src/sns_slack.py"
environment_variables = {
WEBHOOK_URL_SECRET_ARN = var.slack_webhook_url_secret_arn
}
}
Steps to reproduce the behavior:
terraform apply
Expected behavior
Module should be applied.
Actual behavior
Terraform fails with the error shown below.
Terminal Output Screenshot(s)
│ Error: Missing required argument
│
│ with module.sns_slack_lambda.aws_lambda_function.this[0],
│ on .terraform/modules/sns_slack_lambda/main.tf line 43, in resource "aws_lambda_function" "this":
│ 43: replacement_security_group_ids = var.replacement_security_group_ids
│
│ "replacement_security_group_ids": all of
│ `replace_security_groups_on_destroy,replacement_security_group_ids` must be
│ specified
Additional context
This works fine with version 4.11.0.
same. For now I just hardcoded to the prior version.
This issue has been resolved in version 4.12.1 🎉
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.