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

Fix rule identifiers #47

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Fix rule identifiers #47

merged 4 commits into from
Jun 13, 2024

Conversation

bensonce
Copy link
Contributor

Recent changes to our scripts made the distinction between a rule's name and its identifier when parsing documentation. For example, the identifier for the multi-region-cloudtrail-enabled rule is MULTI_REGION_CLOUD_TRAIL_ENABLED, so simply lowercasing and replacing _ with - doesn't result in the other and vice versa.

This PR explicitly adds the rule's identifier to the JSON file generated after parsing documentation, and that identifier is then explicitly referenced in Terraform config instead of transforming the rule name. This should resolve issues like this when applying Terraform:

InvalidParameterValueException: The ruleIdentifier MULTI_REGION_CLOUDTRAIL_ENABLED is invalid. Please refer to Config rules documentation for a list of valid identifiers that can be used for OrganizationManagedRuleMetadata.

@bensonce bensonce self-assigned this Jun 13, 2024
@bensonce bensonce added the bug Something isn't working label Jun 13, 2024
Copy link
Contributor

@duraikkannuv2 duraikkannuv2 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@yangx17 yangx17 left a comment

Choose a reason for hiding this comment

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

LGTM!

@bensonce bensonce merged commit ce02c5c into main Jun 13, 2024
5 of 6 checks passed
@bensonce bensonce deleted the b/fix-rule-identifiers branch June 13, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants