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

Check tags are present on parameter group before update #39337

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

Conversation

ryan-caarter
Copy link

@ryan-caarter ryan-caarter commented Sep 15, 2024

Description

When ABAC is used to control modification of an RDS Parameter Group, IAM Eventual Consistency can block the update command when creating a Parameter Group as the tags used for ABAC haven't propagated to the resource in time for the update, and so an AccessDenied error can occur. We've found this to be an issue in multiple of our AWS accounts:

Error: modifying RDS Cluster Parameter Group (DB_NAME): operation error RDS: ModifyDBClusterParameterGroup, https response error StatusCode: 403, RequestID: 123456789, api error AccessDenied: User: arn:aws:sts::ACCOUNT_ID:assumed-role/ROLE_NAME/aws-go-sdk-123456789 is not authorized to perform: rds:ModifyDBClusterParameterGroup on resource: arn:aws:rds:REGION:ACCOUNT_ID:cluster-pg:DB_NAME-123456789 because no identity-based policy allows the rds:ModifyDBClusterParameterGroup action

There are a few options to fix this:

  • Poll the tags existence and then call update - this isn't backward compatible as users would need rds: ListTagsForResource
  • Add a wait before attempting the update - worse user experience for most users
  • Retry for a good amount of time if AccessDenied is thrown. AWS says most resources are consistent within 5mins, this is too long, from our experience with tags, 10s should be plenty

Relations

Closes #0000

References

Output from Acceptance Testing

% make testacc TESTS=TestAccXXX PKG=ec2

...

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/rds Issues and PRs that pertain to the rds service. needs-triage Waiting for first response or review from a maintainer. labels Sep 15, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @ryan-caarter 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@ryan-caarter ryan-caarter marked this pull request as ready for review September 16, 2024 01:18
@ryan-caarter ryan-caarter requested a review from a team as a code owner September 16, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Waiting for first response or review from a maintainer. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant