Define and customize Blueprints to set what infrastructure configuration options are available to developers.
---
constants:
__name: "{{ name }}_{{ __guid }}"
variables:
name:
desc: "Name of the network interface."
required: true
group: Network Interface Details
resource_group_name:
desc: "Name of the resource group."
required: true
group: Network Interface Details
links_to: resource.azurerm_resource_group.name
location:
desc: "Azure region where the network interface will be created."
required: true
group: Network Interface Details
default: "eastus"
ip_configuration_name:
desc: "Name of the IP configuration."
required: true
group: IP Configuration
default: "ipconfig1"
subnet_id:
desc: "ID of the subnet to associate with the network interface."
required: true
group: IP Configuration
links_to: resource.azurerm_subnet.id
private_ip_address_allocation:
desc: "Defines how the private IP address is assigned. Possible values are 'Dynamic' or 'Static'."
required: false
group: IP Configuration
default: "Dynamic"
network_security_group_id:
desc: "ID of the Network Security Group to associate with the network interface."
required: false
group: Security
links_to: resource.azurerm_network_security_group.id
enable_accelerated_networking:
desc: "Enable accelerated networking on the network interface."
required: false
group: Advanced
default: false
advanced: true
tags:
group: Tags
required: false
groups:
Network Interface Details:
order: 1
desc: "Basic settings for the network interface."
IP Configuration:
order: 2
desc: "IP configuration settings."
Security:
order: 3
desc: "Security settings for the network interface."
Advanced:
order: 4
desc: "Advanced settings for the network interface."
Tags:
order: 5
desc: "Tags to assign to the network interface."
---
resource "azurerm_network_interface" "__name" {
name = {{ name }}
location = {{ location }}
resource_group_name = {{ resource_group_name }}
ip_configuration {
name = {{ ip_configuration_name }}
subnet_id = {{ subnet_id }}
private_ip_address_allocation = {{ private_ip_address_allocation }}
}
network_security_group_id = {{ network_security_group_id | required: false }}
enable_accelerated_networking = {{ enable_accelerated_networking }}
tags = {
Name = {{ name }}
{{# tags }}
{{ tags.key | required: false }} = {{ tags.value | required: false }}
{{/ tags }}
}
}
// Ensures the network interface is associated with a subnet and optional network security group.
// Uses default settings that promote security and performance.
// Tags are included for better resource management and identification.
//
A form is created automatically that accepts inputs that you defined in the Blueprint.
After filling out the Blueprint form, Terraform is generated and a PR is automatically submitted.