resource "azurerm_subnet" "subnet" { name = "${var.rg_prefix}subnet" virtual_network_name = "${azurerm_virtual_network.vnet.name}" resource_group_name = "${azurerm_resource_group.rg.name}" address_prefix = "${var.subnet_prefix}" } resource "azurerm_lb" "lb" { resource_group_nam...
resource "azurerm_virtual_network" "helloterraformnetwork" { name = "tfvn" address_space = ["10.0.0.0/16"] location = "China North" resource_group_name = "${azurerm_resource_group.helloterraform.name}" } # 创建一个虚拟子网 resource "azurerm_subnet" "helloterraformsubnet" { name = "tf...
[azurerm_resource_group.rg] } resource "azurerm_subnet_network_security_group_association" "nsg_assoc" { subnet_id = azurerm_subnet.subnet.id network_security_group_id = azurerm_network_security_group.nsg.id } data "azurerm_virtual_network" "ad_vnet_data" { name = var.ad_vnet resource...
此代码在myVnet虚拟网络中创建名为mySubnet的子网。 查看以下代码,然后将其复制并粘贴到 Cloud Shell 编辑器中的 main.tf 文件末尾。 保存文件 (Ctrl + S)。 HashiCorp 配置语言 #4-Create Subnet resource"azurerm_subnet""myterraformsubnet"{ name ="mySubnet"resource_grou...
资源Azure 资源类型Terraform 资源类型 资源组 Microsoft.Resources/resourceGroups azurerm_resource_group 虚拟网络 Microsoft.Network/virtualNetworks azurerm_virtual_network 子网 Microsoft.Network/virtualNetworks/subnets azurerm_subnet 虚拟网络网关 Microsoft.Network/virtualNetworkGateways azurerm_virtual_network_gateway...
resource"azurerm_virtual_network""vnet"{ count =3name ="${random_pet.virtual_network_name.id}-0${count.index}"resource_group_name = azurerm_resource_group.rg.name location = azurerm_resource_group.rg.location address_space = ["10.${count.index}.0.0/16"] }# Add a ...
Terraform module for Tailscale Subnet Router in Azure ACI - crisalid/terraform-azure-tailscale-subnet-router
It provisions resource group, virtual network, subnet, public IP, load balancer and NAT rules and VM availability set. For example, here is the VM resource template: resource "azurerm_virtual_machine" "vm" { name = "vm${count.index}" ...
terraform >= 1.3.5 azurerm ~> 4.0 modtm 0.3.2 random >= 3.3.2, < 4.0 Providers NameVersion azurerm ~> 4.0 modtm 0.3.2 random >= 3.3.2, < 4.0 Modules No modules. Resources NameType azurerm_subnet.subnet_count resource azurerm_subnet.subnet_for_each resource azurerm_subnet_network_...
subnet] resource_group_location = module.resource_group.resource_group_location source = "https://github.com/slovink/terraform-azure-network-security-group.git?ref=1.0.0" label_order = ["name", "environment"] app_name = "app" environment = "test" subnet_ids = module.subnet.default_subnet...