Skip to content

Commit 19047f2

Browse files
author
Phileas Lebada
authored
Fix discouraged usage of iam_policy_attachment
The comment above also links to an IAM role policy attachment. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy_attachment is discouraging, pointing out issues/limitations using iam_policy_attachment. This should allow the same functionality
1 parent 9022013 commit 19047f2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/bottlerocket/main.tf

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ EOT
5757

5858
# SSM policy for bottlerocket control container access
5959
# https://github.com/bottlerocket-os/bottlerocket/blob/develop/QUICKSTART-EKS.md#enabling-ssm
60-
resource "aws_iam_policy_attachment" "ssm" {
61-
name = "ssm"
62-
roles = [module.eks.worker_iam_role_name]
60+
resource "aws_iam_role_policy_attachment" "ssm" {
61+
roles = module.eks.worker_iam_role_name
6362
policy_arn = data.aws_iam_policy.ssm.arn
6463
}

0 commit comments

Comments
 (0)