feat: Replace the use of toset() with static keys for node IAM role policy attachment (#2962)

This commit is contained in:
Bryant Biggs
2024-03-10 12:49:41 -04:00
committed by GitHub
parent bed26ac421
commit 57f5130132
6 changed files with 80 additions and 15 deletions

View File

@@ -54,3 +54,24 @@ moved {
from = aws_cloudwatch_event_rule.this["spot_interupt"]
to = aws_cloudwatch_event_rule.this["spot_interrupt"]
}
################################################################################
# Migrations: v20.7 -> v20.8
################################################################################
# Node IAM role policy attachment
# Commercial partition only - `moved` does now allow multiple moves to same target
moved {
from = aws_iam_role_policy_attachment.node["arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy"]
to = aws_iam_role_policy_attachment.node["AmazonEKSWorkerNodePolicy"]
}
moved {
from = aws_iam_role_policy_attachment.node["arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"]
to = aws_iam_role_policy_attachment.node["AmazonEC2ContainerRegistryReadOnly"]
}
moved {
from = aws_iam_role_policy_attachment.node["arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"]
to = aws_iam_role_policy_attachment.node["AmazonEKS_CNI_Policy"]
}