Skip to content

Enhance Attribute Name Validation to Handle Leading Numerics #705

@bflad

Description

@bflad

Module version

v1.2.0

Use-cases

The framework's attribute name validation is currently the regular expression ^[a-z0-9_]+$. The Terraform configuration language forbids identifiers (how attribute names are handled) from beginning with numeric characters.

Proposal

Adjust the attribute name validation regular expression to ^[a-z_][a-z0-9_]*$. Technically the validation should also permit hyphens (-), however the provider ecosystem has conventionally never used hyphens in attribute names, so the framework should remain opinionated here to prevent introducing practitioner confusion.

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions