You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the assume_role_policy having the service principals not in alphabetical order causes drift. I believe that changing the order would fix this.
Terraform detected the following changes made outside of Terraform since the last "terraform apply":
# module.aft.module.aft_lambda_layer.aws_iam_role.codebuild has been changed
~ resource "aws_iam_role" "codebuild" {
~ assume_role_policy = jsonencode(
~ {
~ Statement = [
~ {
~ Principal = {
~ Service = [
- "events.amazonaws.com",
"codebuild.amazonaws.com",
+ "events.amazonaws.com",
]
}
# (2 unchanged elements hidden)
},
]
# (1 unchanged element hidden)
}
)
id = "python-layer-builder-aft-common-4vpk5j6o"
name = "python-layer-builder-aft-common-4vpk5j6o"
tags = {}
# (8 unchanged attributes hidden)
# (1 unchanged block hidden)
}
The text was updated successfully, but these errors were encountered:
Looking at the template for the trust policy on that codebuild resource, I do not see that it has ever been in the order you're seeing. Was there a chance the policy was modified out of band?
No. It has only been touched by the TF module. Looking at the template they are in order. It appears for some reason that it gets saved to state differently.
It looks like the assume_role_policy having the service principals not in alphabetical order causes drift. I believe that changing the order would fix this.
The text was updated successfully, but these errors were encountered: