Checks whether any label in the resource metadata is invalid. The rule validates each label key against the regular expression ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$; when a label key does not match, the rule flags the resource.
# Non-Kubernetes Terraform resources may use `metadata.labels` with values that
# do not satisfy the Kubernetes label-value regex. Those resources are governed
# by the schema of their own provider and should not be flagged by this rule.
resource"teleport_app""bff_grpc"{version="v3"metadata={name="bff-grpc-staging"labels={environment="staging"app="bff"transport="tcp""teleport.dev/origin"="dynamic"}}spec={uri="tcp://bff.example.com:443"}}