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

Add cloudwatch:TagResource permission to ProvisionAssessment policy #245

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

dav3r
Copy link
Member

@dav3r dav3r commented Aug 9, 2024

🗣 Description

This PR adds the cloudwatch:TagResource permission to the "ProvisionAssessment" policy.

💭 Motivation and context

Previously, this permission was not necessary, but it is now needed to successfully create CloudWatch alarms.

Without this change, we were seeing errors like this:

│ Error: creating CloudWatch Metric Alarm (ec2_cpu_utilization_i-1234567890abcdef): AccessDenied:
User: arn:aws:sts::123456789012:assumed-role/ProvisionAccount/admin is not authorized to perform:
cloudwatch:TagResource on resource:
arn:aws:cloudwatch:us-east-1:123456789012:alarm:ec2_cpu_utilization_i-1234567890abcdef
because no identity-based policy allows the cloudwatch:TagResource action

Thanks @adevine31 for bringing this to my attention! 👍

🧪 Testing

@adevine31 confirmed that he was able to successfully apply the Terraform in this repository using the changes in this PR.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

This is now needed to successfully create CloudWatch alarms.
@dav3r dav3r added the bug This issue or pull request addresses broken functionality label Aug 9, 2024
@dav3r dav3r self-assigned this Aug 9, 2024
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

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

Great catch @adevine31!

@dav3r dav3r merged commit 27398a5 into develop Aug 12, 2024
4 checks passed
@dav3r dav3r deleted the bugfix/add-cw-permission branch August 12, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants