n this quickstart, you use Terraform to create an Azure Application Gateway.
Then
you test the application gateway to make sure it works correctly. The Standard v2
SKU is used in this example.
Terraform enables the definition, preview, and deployment of cloud infrastructure.
Using Terraform, you create configuration files using HCL syntax. The HCL syntax
allows you to specify the cloud provider - such as Azure - and the elements that
make up your cloud infrastructure. After you create your configuration files, you
create an execution plan that allows you to preview your infrastructure changes
before they're deployed. Once you verify the changes, you apply the execution plan
to deploy the infrastructure.
Create an Azure resource group using azurerm_resource_group
Create an Azure Virtual Network using azurerm_virtual_network
Create an Azure subnet using azurerm_subnet
Create an Azure public IP using azurerm_public_ip
Create an Azure Application Gateway using azurerm_application_gateway
Create an Azure network interface using azurerm_network_interface
Create an Azure network interface application gateway backend address pool
association
using azurerm_network_interface_application_gateway_backend_address_poo
l_association
Create an Azure Windows Virtual Machine
using azurerm_windows_virtual_machine
Create an Azure Virtual Machine Extension
using azurerm_virtual_machine_extension
Note
Application Gateway frontend now supports dual-stack IP addresses (Preview). You
can now create up to four frontend IP addresses: Two IPv4 addresses (public and
private) and two IPv6 addresses (public and private).
Prerequisites
Install and configure Terraform
Implement the Terraform code
Note
The sample code for this article is located in the Azure Terraform GitHub repo.
You can view the log file containing the test results from current and previous
versions of Terraform.
See more articles and sample code showing how to use Terraform to
manage Azure resources