Resource Attribute Aliases
Resource Attribute Aliases let you define shorthand names and default values for resource properties, making your desired state templates shorter and more readable.
Overview
When authoring desired state YAML, certain resource properties require long or hard-to-remember values (e.g., Azure VM image references, disk SKUs). Instead of looking these up every time, you can define aliases that map a friendly name to the actual value, and set default values for properties you use frequently.
How It Works
Aliases are configured per team, cloud provider, and resource type. Each alias mapping has three fields:
Attribute
The resource property path (e.g., storage_profile.image_reference)
Alias
A short, memorable name you can use in templates (e.g., ubuntu-arm64)
Default
A default value applied automatically if the property is not specified in the desired state
Managing Aliases
Navigate to Infrastructure → Stateless IaC Aliases in the MechCloud console.
Select a Team and Cloud Provider
Click New Alias to create a mapping for a resource type
Define one or more attribute mappings with alias names and/or default values
Click Save
Supported Providers
Aliases are available for all cloud providers that support Stateless IaC:
AWS — e.g., AMI aliases (see Resource Id Aliases for the
{{Image|alias}}syntax)Azure — e.g., VM image references, disk types, VM sizes
GCP — e.g., machine types, disk types, image families
Benefits
Shorter templates — Replace verbose property values with short alias names
Consistency — Default values ensure all resources of a type use the same base configuration
Less errors — No need to look up exact values for common properties
Team-scoped — Each team can define their own aliases matching their standards
Last updated