OCPBUGS-92831: Add missing IAM permissions to HCP AWS STS role policy#115006
OCPBUGS-92831: Add missing IAM permissions to HCP AWS STS role policy#115006asadawar wants to merge 1 commit into
Conversation
The documented IAM policy for the HCP AWS STS CLI role is missing five permissions that are present in the hypershift source (cmd/infra/aws/create_cli_role.go). Without these, hcp destroy cluster aws fails during IAM cleanup with AccessDenied errors. Assisted-by: Claude Code
|
@asadawar: This pull request references Jira Issue OCPBUGS-92831, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/label merge-review-needed |
|
/jira refresh |
|
@asadawar: This pull request references Jira Issue OCPBUGS-92831, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@asadawar: This pull request references Jira Issue OCPBUGS-92831, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
🤖 Thu Jul 09 17:22:20 - Prow CI generated the docs preview: |
|
@asadawar: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
hcp-aws-create-role-sts-creds.adoccmd/infra/aws/create_cli_role.go)Why this change
The documented IAM policy for creating an AWS STS role for HCP is missing permissions that the
hcpCLI expects. A customer following the documented procedure was able to create a cluster, buthcp destroy cluster awsfailed with AccessDenied errors during IAM cleanup:Comparing the documented policy against the hypershift source (
cmd/infra/aws/create_cli_role.go), the following 5 permissions are in the source but missing from the docs:iam:ListAttachedRolePoliciesiam:ListRolePoliciesiam:DetachRolePolicyiam:TagInstanceProfileiam:TagOpenIDConnectProviderThe new permissions are inserted in the same position as they appear in the hypershift source to keep the policy consistent.
OCPBUGS-92831: https://redhat.atlassian.net/browse/OCPBUGS-92831