Description I would like to validate the resource name of a Terraform resource against a custom naming convention policy. Specifically, I want to ensure that the resource name does not contain dashes (-) within it. However, I'm unable to find a suitable method to accomplish this.
Example Code
resource "google_storage_bucket" "bucket-prd" { }
Environment
Checkov Version: 2.3.311
Expected Behavior I expect to be able to check the resource name (bucket-prd) against a custom naming convention policy that prohibits the use of dashes (-) within the name. However, I have been unable to find a way to achieve this.
Please provide guidance or suggest any available methods to validate the resource name against the desired custom policy. Thank you.
As i searched in the documentations from checkov i couldn't find anything related to resource_name within terraform code.