Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the last "terraform apply":
# aws_kms_key.cloudwatch_notifications has been changed
~ resource "aws_kms_key" "cloudwatch_notifications" {
id = "###########################"
~ policy = jsonencode(
~ {
~ Statement = [
{
Action = "kms:*"
Effect = "Allow"
Principal = {
AWS = "arn:aws:iam::999999999999:root"
}
Resource = "*"
Sid = "root_access"
},
~ {
~ Principal = {
~ AWS = [
- "arn:aws:iam::999999999999:user/abc",
- "arn:aws:iam::999999999999:user/def",
- "arn:aws:iam::999999999999:user/ghi",
- "arn:aws:iam::999999999999:user/readonly",
- "arn:aws:iam::999999999999:user/jkl",
- "arn:aws:iam::999999999999:user/mno",
- "arn:aws:iam::999999999999:user/pqr",
+ "arn:aws:iam::999999999999:user/stu",
+ "arn:aws:iam::999999999999:user/vwx",
"arn:aws:iam::999999999999:user/yz",
- "arn:aws:iam::999999999999:user/abc1",
- "arn:aws:iam::999999999999:user/def1",
+ "arn:aws:iam::999999999999:user/jkl1",
"arn:aws:iam::999999999999:user/mno1",
"arn:aws:iam::999999999999:user/pqr1",
- "arn:aws:iam::999999999999:user/vwx",
+ "arn:aws:iam::999999999999:user/readonly",
"arn:aws:iam::999999999999:user/ghi1",
+ "arn:aws:iam::999999999999:user/def1",
+ "arn:aws:iam::999999999999:user/def",
+ "arn:aws:iam::999999999999:user/abc1",
+ "arn:aws:iam::999999999999:user/stu1",
+ "arn:aws:iam::999999999999:user/abc",
+ "arn:aws:iam::999999999999:user/ghi",
+ "arn:aws:iam::999999999999:user/jkl",
"arn:aws:iam::999999999999:user/vwx1",
"arn:aws:iam::999999999999:user/yz1",
- "arn:aws:iam::999999999999:user/stu",
- "arn:aws:iam::999999999999:user/jkl1",
- "arn:aws:iam::999999999999:user/stu1",
+ "arn:aws:iam::999999999999:user/pqr",
+ "arn:aws:iam::999999999999:user/mno"
]
}
# (4 unchanged elements hidden)
},
{
Action = [
"kms:GenerateDataKey*",
"kms:Decrypt",
]
Effect = "Allow"
Principal = {
Service = "cloudwatch.amazonaws.com"
}
Resource = "*"
Sid = "cloudwatch_encrypt_access"
},
]
# (1 unchanged element hidden)
}
)
tags = {
"Environment" = "dev"
"Role" = "cloudwatch"
"Terraform" = "true"
}
# (9 unchanged attributes 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:
terraform apply -refresh-only
The obfuscation of the names above is consistent - i.e. “smithj” is “abc” for both “+” and “-”.
The above plan is after a new installation from a sorted local being passed to the principal.
locals {
sorted_readonly = sort(data.aws_iam_group.readonly.users[*].arn)
}
data "aws_iam_group" "readonly" {
group_name = "readonly"
}