Skip to content

Think-Cube/terraform-azure-virtual-network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Name Version
terraform >= 1.6.4
azurerm 4.14.0

Providers

Name Version
azurerm 4.14.0

Modules

No modules.

Resources

Name Type
azurerm_subnet.main resource
azurerm_virtual_network.main resource
azurerm_client_config.current data source
azurerm_resource_group.rg data source

Inputs

Name Description Type Default Required
default_tags A mapping of tags to assign to the resource. map(any)
{
"ManagedByTerraform": "True"
}
no
environment Variable that defines the name of the environment. string "dev" no
region Region in which resources are deployed. string "weu" no
resource_group_location The location/region where the virtual network is created. Changing this forces a new resource to be created. string "West Europe" no
resource_group_name The name of the resource group in which to create the virtual network. string n/a yes
subnet_prefix List of subnets with their prefixes and optional service endpoints and delegations
map(object({
name = string
ip = list(string)
service_endpoints = optional(list(object({
service = string
})), [])
delegations = optional(list(object({
name = string
service_name = string
actions = list(string)
})), [])
private_endpoint_network_policies = optional(string, null)
private_link_service_network_policies_enabled = optional(string, null)
}))
{
"example-subnet-1": {
"delegations": [
{
"actions": [
"Microsoft.Network/virtualNetworks/subnets/action"
],
"name": "delegation1",
"service_name": "Microsoft.Web/serverFarms"
}
],
"ip": [
"10.0.1.0/24"
],
"name": "subnet-1",
"private_endpoint_network_policies": "Disabled",
"private_link_service_network_policies_enabled": false,
"service_endpoints": [
{
"service": "Microsoft.Storage"
},
{
"service": "Microsoft.Sql"
}
]
},
"example-subnet-2": {
"delegations": [
{
"actions": [
"Microsoft.Network/virtualNetworks/subnets/action"
],
"name": "delegation2",
"service_name": "Microsoft.Web/serverFarms"
}
],
"ip": [
"10.0.2.0/24"
],
"name": "subnet-2",
"private_endpoint_network_policies": "Disabled",
"private_link_service_network_policies_enabled": false,
"service_endpoints": [
{
"service": "Microsoft.Storage"
}
]
}
}
no
vnet_address_space The address space that is used the virtual network. You can supply more than one address space. string "10.0.0.0/16" no
vnet_custom_dns If applicable, a list of custom DNS servers to use inside your virtual network. Unset will use default Azure-provided resolver list(string) null no
vnet_name The name of the virtual network. Changing this forces a new resource to be created. string "VirtualNetwork1" no

Outputs

Name Description
address_space The list of address spaces used by the virtual network.
id The virtual NetworkConfiguration ID.
location The location/region where the virtual network is created.
name The name of the virtual network.
resource_group_name The name of the resource group in which to create the virtual network.