Skip to content

Commit 7474e06

Browse files
committed
Redundant ignore_changes element
│ Warning: Redundant ignore_changes element │ │ on .terraform/modules/security_header_lambda/aws_lambda_function.tf line 2, in resource "aws_lambda_function" "lambda": │ 2: resource "aws_lambda_function" "lambda" { │ │ Adding an attribute name to ignore_changes tells Terraform to ignore future changes to the argument in configuration after the │ object has been created, retaining the value originally configured. │ │ The attribute last_modified is decided by the provider alone and therefore there can be no configured value to compare with. │ Including this attribute in ignore_changes has no effect. Remove the attribute from ignore_changes to quiet this warning. ╵
1 parent a77a93d commit 7474e06

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

aws_lambda_function.tf

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Create the Lambda function. Each new apply will publish a new version.
22
resource "aws_lambda_function" "lambda" {
3-
function_name = var.function_name
4-
description = var.description
5-
provider = aws.cloudfront
3+
function_name = var.function_name
4+
description = var.description
5+
provider = aws.cloudfront
66
# Find the file from S3
77
s3_bucket = data.aws_s3_bucket.artifact_bucket.id
88
s3_key = aws_s3_bucket_object.artifact.id
@@ -15,13 +15,12 @@ resource "aws_lambda_function" "lambda" {
1515

1616
lifecycle {
1717
ignore_changes = [
18-
last_modified,
1918
filename
2019
]
2120
}
2221

2322
tags = merge(var.common_tags, {
2423
"Name" = "${upper(var.environment)}-LOG-COLLECTOR-LAMBDA"
25-
},
24+
},
2625
)
2726
}

0 commit comments

Comments
 (0)