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

feat: refactor iam roles to remove inline_policy deprecation warning #153

Merged

Conversation

Marcel2603
Copy link
Contributor

The inline_policy of aws_iam_role is deprecated https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role

We receive multiple terraform warnings on each tf apply. For this reason, i've moved all inline_policies to aws_iam_role_policy.

On first tf apply, there will be 6 new resources of type aws_iam_role_policy. You will not see any difference in the aws iam role.

@Marcel2603 Marcel2603 changed the title fix IAM: refactor iam roles to remove inline_policy deprecation warning fix iam: refactor iam roles to remove inline_policy deprecation warning Jan 3, 2025
@Marcel2603 Marcel2603 changed the title fix iam: refactor iam roles to remove inline_policy deprecation warning feat: refactor iam roles to remove inline_policy deprecation warning Jan 3, 2025
Copy link
Owner

@moritzzimmer moritzzimmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @Marcel2603!

While we're at it - could you please use aws_iam_policy_document instead of jsonencode at all places where a policy or assume_role_policy value is assigned

@moritzzimmer moritzzimmer merged commit 73c9b10 into moritzzimmer:main Jan 28, 2025
10 checks passed
@Marcel2603 Marcel2603 deleted the fix/resolve-iam-deprecations branch January 28, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants