Provisions an Azure resource group and VNet containing a webserver VM and sample HashiCafe website, using a base image registered in HCP Packer.
Enabled for Terraform Cloud no-code provisioning.
For no-code provisioning, Azure credentials must be supplied to the workspace via environment variables (e.g. ARM_TENANT_ID
, ARM_SUBSCRIPTION_ID
, ARM_CLIENT_ID
, and ARM_CLIENT_SECRET
for a service principal). It is recommended to attach these via a project.
Also requires environment variables containing an HCP service principal credential (HCP_CLIENT_ID
and HCP_CLIENT_SECRET
). It is recommende to attach these globally or to projects where no-code workspaces will be provisioned.
Name | Version |
---|---|
terraform | >= 1.2 |
azurerm | ~> 3.0 |
hcp | ~> 0.82 |
null | ~> 3.1 |
random | ~> 3.4 |
Name | Version |
---|---|
azurerm | ~> 3.0 |
hcp | ~> 0.82 |
null | ~> 3.1 |
random | ~> 3.4 |
No modules.
Name | Type |
---|---|
azurerm_linux_virtual_machine.hashiapp | resource |
azurerm_network_interface.hashiapp-nic | resource |
azurerm_network_interface_security_group_association.hashiapp-nic-sg-assoc | resource |
azurerm_network_security_group.hashiapp-sg | resource |
azurerm_public_ip.hashiapp-pip | resource |
azurerm_resource_group.myresourcegroup | resource |
azurerm_subnet.subnet | resource |
azurerm_virtual_network.vnet | resource |
null_resource.configure-web-app | resource |
random_integer.product | resource |
hcp_packer_artifact.ubuntu-webserver | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
address_space | The address space that is used by the virtual network. You can supply more than one address space. Changing this forces a new resource to be created. | string |
"10.0.0.0/16" |
no |
admin_password | Administrator password for OS. | string |
"Password123!" |
no |
admin_username | Administrator user name for OS. | string |
"hashicorp" |
no |
department | Value for the department tag. | string |
"WebDev" |
no |
env | Value for the environment tag. | string |
n/a | yes |
hashi_products | n/a | list(object({ |
[ |
no |
location | The region where the virtual network is created. | string |
n/a | yes |
packer_bucket | HCP Packer image bucket name. | string |
"ubuntu22-nginx" |
no |
packer_channel | HCP Packer image channel. | string |
"production" |
no |
prefix | This prefix will be included in the name of most resources. | string |
n/a | yes |
subnet_prefix | The address prefix to use for the subnet. | string |
"10.0.10.0/24" |
no |
vm_size | Specifies the size of the virtual machine. | string |
"Standard_B2s" |
no |
Name | Description |
---|---|
base_image | n/a |
hashiapp_url | n/a |
product | The product which was randomly selected. |