caf-naming-validation

Validate Azure CAF naming conventions in Terraform modules and examples.

7|5|Updated Jan 22, 2025
One-click install
npx skills add https://github.com/aztfmodnew/terraform-azurerm-caf --skill caf-naming-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caf-naming-validation
Source: https://github.com/aztfmodnew/terraform-azurerm-caf/tree/main/.github/skills/caf-naming-validation
Command: npx skills add https://github.com/aztfmodnew/terraform-azurerm-caf --skill caf-naming-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures that all Azure resources created via Terraform modules and examples adhere to the strict naming conventions defined by the Azure Cloud Adoption Framework (CAF), preventing naming conflicts and maintaining governance.

Core Features & Use Cases

  • Module Validation: Verifies that Terraform modules correctly implement CAF naming using the azurecaf provider.
  • Example Validation: Checks that example configurations do not contain CAF prefixes and follow naming best practices.
  • Error Resolution: Identifies and provides guidance on fixing common naming errors like length violations, invalid characters, and prefix duplication.
  • Use Case: When developing a new Terraform module for Azure, use this Skill to automatically validate that all resource names (like resource groups, storage accounts, key vaults) will be generated according to CAF standards, ensuring consistency and compliance before deployment.

Quick Start

Validate the CAF naming conventions for the managed_redis module.

Frequently Asked Questions about caf-naming-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Azure CAF naming conventions in my Terraform modules?

You can validate Azure CAF naming conventions by checking `azurecaf_name.tf` configurations, resource type mappings, and generated name usage against CAF standards for length, characters, and uniqueness.

What is the Azure Cloud Adoption Framework naming validation process for Terraform?

Azure CAF naming validation verifies that Terraform modules enforce naming via the `azurecaf` provider, ensuring resources like storage accounts and key vaults are generated consistently according to CAF governance standards before deployment.

Why does my Terraform example fail Azure CAF naming checks due to prefix duplication?

Terraform examples fail Azure CAF naming checks when they contain CAF prefixes or violate descriptive naming best practices. This Skill identifies prefix duplication and provides guidance on resolving these naming errors.

Can I use this validation for Terraform modules creating resource groups and key vaults?

Yes, you can use this validation for Terraform modules creating resource groups, storage accounts, and key vaults to automatically ensure all resource names comply with Azure CAF standards and prevent naming conflicts.

What are the limitations when enforcing Azure CAF naming standards in Terraform?

Limitations when enforcing Azure CAF naming standards include handling strict length violations and invalid characters in resource names. This Skill checks for these constraints but requires correct `azurecaf` provider setup to function properly.