Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Discouraged usage of iam_policy_attachment in example #1529

Merged
merged 2 commits into from
Aug 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: discourage 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
Phileas Lebada authored and Phileas Lebada committed Aug 18, 2021
commit c1650efd9827262b64fd393a1e41043871faef1f
5 changes: 2 additions & 3 deletions examples/bottlerocket/main.tf
Original file line number Diff line number Diff line change
@@ -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
}