diff --git a/examples/bottlerocket/main.tf b/examples/bottlerocket/main.tf index 86166df0e5..b254af0a12 100644 --- a/examples/bottlerocket/main.tf +++ b/examples/bottlerocket/main.tf @@ -57,8 +57,7 @@ EOT # SSM policy for bottlerocket control container access # https://github.com/bottlerocket-os/bottlerocket/blob/develop/QUICKSTART-EKS.md#enabling-ssm -resource "aws_iam_policy_attachment" "ssm" { - name = "ssm" - roles = [module.eks.worker_iam_role_name] +resource "aws_iam_role_policy_attachment" "ssm" { + role = module.eks.worker_iam_role_name policy_arn = data.aws_iam_policy.ssm.arn }