Skip to content

Terraform Module to create Azure VNET and subnets using terraform 0.12

License

Notifications You must be signed in to change notification settings

rhythmictech/terraform-azure-vnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-azure-vnet

CircleCI Terraform Module Registry Terraform Version License: MIT

Terraform Module to create Azure VNET and subnets using terraform 0.12

Subnets

Subnet creation is using for_each in resources new in terraform 0.12.6

When creating subnets there is no way to "attach" them to a security group using this module. It is a conscious choice because of the deprication of that field.

Instead use Subnet security group assosciation outside the module.

DDOS Protection Plan

If you are using ddos protection plan option it creates an additional Azure resource group called "NetworkWatcherRG" this is a resource group created by Azure. In addition terraform is unable to destroy the ddos protection plan so it has to be performed manually.

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_network_ddos_protection_plan.ddos resource
azurerm_resource_group.rg resource
azurerm_subnet.subnet resource
azurerm_subnet_route_table_association.route_table_associations resource
azurerm_virtual_network.vnet resource

Inputs

Name Description Type Default Required
create_ddos_plan Option to create an ddos plan bool false no
create_resource_group Option to create a Azure resource group to use for VNET bool true no
ddos_plan_name Name of the ddos plan string "myDDOSplan" no
ddos_resource_tags Additional(optional) tags for ddos plan map(string) {} no
resource_group_location Location for resource group See. https://azure.microsoft.com/en-us/global-infrastructure/locations/ string "North Europe" no
resource_group_name The name of the resource group to use for the VNET, it is used in both cases even if the resource group is created string "myRG" no
resource_group_tags Additional(optional) tags for resource group map(string) {} no
route_tables_ids A map of subnet name to Route table ids map(string) {} no
subnets Map of subnet objects. name, cidr, and service_endpoints supported
map(object({
name = string
cidr = string
enforce_private_link_network_policies = bool
service_endpoints = list(string)
}))
{} no
vnet_cidr The CIDR block for VNET list
[
"10.0.0.0/16"
]
no
vnet_dns_servers Optional dns servers to use for VNET list [] no
vnet_name Name of the VNET string "myVNET" no
vnet_resource_tags Additional(optional) tags for VNET map(string) {} no

Outputs

Name Description
ddos_protection_plan Ddos protection plan
resource_group Resource group for VNET
subnets Created subnet resources
vnet VNET resource

About

Terraform Module to create Azure VNET and subnets using terraform 0.12

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 100.0%