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

Replace managed_policy_arns with aws_iam_role_policy_attachment #162

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

coilysiren
Copy link
Contributor

@coilysiren coilysiren commented Jan 21, 2025

Context

navapbc/template-infra#785

This PR fixes deprecation warning linked in the above ticket

Testing / Validation

Before & After, you'll notice that the same policy is attached

image image

Preview environment for app

Preview environment for app-rails

@coilysiren
Copy link
Contributor Author

Seems like CI is failing because you need to detach the policies before you can delete them

https://github.com/navapbc/platform-test/actions/runs/12897889821/job/35963884480?pr=162#step:6:5626

@lorenyu
Copy link
Collaborator

lorenyu commented Jan 29, 2025

@coilysiren I looked into it. Look at this post hashicorp/terraform-provider-aws#39818

Solution: Switch to using aws_iam_role_policy_attachment, not aws_iam_role_policy_attachments_exclusive

Maybe add a comment

@coilysiren
Copy link
Contributor Author

@lorenyu ahah! thanks

Copy link
Collaborator

@lorenyu lorenyu left a comment

Choose a reason for hiding this comment

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

LGTM once tests pass!

@coilysiren coilysiren changed the title Remove managed_policy_arns arg Replace managed_policy_arns with aws_iam_role_policy_attachment Jan 31, 2025
@coilysiren coilysiren changed the title Replace managed_policy_arns with aws_iam_role_policy_attachment Replace managed_policy_arns with aws_iam_role_policy_attachment Jan 31, 2025
@coilysiren coilysiren marked this pull request as ready for review January 31, 2025 21:31
coilysiren added a commit to navapbc/template-infra that referenced this pull request Feb 13, 2025
…862)

## Context

#785

This PR fixes deprecation warning linked in the above ticket

## Testing / Validation

see: navapbc/platform-test#162
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