Skip to content

Conversation

@hearde
Copy link
Contributor

@hearde hearde commented Mar 10, 2023

  • fix generator ID pattern used by SC auto-trigger EventBridge rules
  • fix regex used by SC control runbook to validate AutoScaling group names

With auto-trigger rule enabled, SC AutoScaling.1 remediation triggers and succeeds.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

scope: RemediationScope.REGIONAL,
resourceIdName: 'AutoScalingGroupName',
resourceIdRegex: String.raw`^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{11}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName\/(.*)$`,
resourceIdRegex: String.raw`^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName/(.{1,255})$`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a fix we made in v1.5.1 to the other standards but it didn't get merged forward. I reviewed all the CRs between v1.5.0 and v1.5.1 for anything similar and found nothing.

This does bring up the fact that the regexes in SC are not validated against the regex registry. I'll add an item to do that.

@hearde hearde merged commit 33a8d38 into aws-solutions:develop Mar 13, 2023
@hearde hearde deleted the bugfix/sc-rule branch March 13, 2023 18:37
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.

3 participants