Hello,
I am running Terraform in AWS. After running terraform plan, I get this output.
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the last "terraform apply":
# module.cf_eu_domain_com.aws_iam_role.this has changed
~ resource "aws_iam_role" "this" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Principal = {
~ Service = [
- "edgelambda.amazonaws.com",
"lambda.amazonaws.com",
+ "edgelambda.amazonaws.com",
]
}
# (3 unchanged elements hidden)
},
]
# (1 unchanged element hidden)
}
)
id = "community_lambda_role"
name = "community_lambda_role"
tags = {}
# (8 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to
undo or respond to these changes.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
No changes. Your infrastructure matches the configuration.
Your configuration already matches the changes detected above. If you'd like to update the Terraform state to match, create and apply a refresh-only plan:
I run terraform apply -refresh-only, it finishes, I run plan again and the same output appears.
It does not create any functional issue to the env. It is just a bit confusing.
Any recommendations or advises to workaround this, are welcomed and highly appreciated.
Thank you!
Pantelis