terraform-linters / tflint-ruleset-aws

TFLint ruleset for terraform-provider-aws
Mozilla Public License 2.0
337 stars 72 forks source link

aws_acm_certificate_invalid_private_key should allow for RSA private key content #573

Closed Hasgaroth closed 12 months ago

Hasgaroth commented 12 months ago

Hi, Currently, the rule for checking the private_key checks for content containing BEGIN PRIVATE KEY and END PRIVATE KEY, but we are using RSA-based private keys which contain the following text - BEGIN RSA PRIVATE KEY and END RSA PRIVATE KEY - so the following check fails.

https://github.com/terraform-linters/tflint-ruleset-aws/blob/e3d27b60c3f38ba859a5d9930d34680bc83d2bdd/rules/models/aws_acm_certificate_invalid_private_key.go#L31C52-L31C52

Please add the ability to accept either RSA or regular certificate private keys.

Thanks :)

bendrucker commented 12 months ago

This would be an easy PR!