-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariable.tf
More file actions
117 lines (101 loc) · 2.78 KB
/
variable.tf
File metadata and controls
117 lines (101 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
variable "resource_group_name" {
description = "Name of the resource group."
type = string
default = "my-vnet-rg"
}
variable "location" {
description = "Azure region where resources will be deployed."
type = string
default = "eastus"
}
variable "vnet_name" {
description = "Name of the virtual network."
type = string
default = "my-vnet"
}
variable "route_table_name" {
type = string
default = "vnet_route_table"
}
variable "gateway_name" {
description = "The name of this NAT gateway."
type = string
default = "vnet-nat-gateway"
}
variable "pip_name" {
description = "The name of the public ip"
type = string
default = "public_ip"
}
variable "address_space" {
description = "CIDR block for the virtual network."
type = string
#default = "10.0.0.0/16"
}
variable "sku" {
description = "The SKU for this public IP address."
type = string
default = "Standard"
}
variable "allocation_method" {
description = "The allocation method to use for this public IP address."
type = string
default = "Static"
}
variable "subnets" {
description = "Map of subnets and their CIDR blocks."
type = map(object({
address_prefixes = list(string)
associate_with_route_table = bool
is_nsg = optional(bool, false)
network_security_group_association = optional(object({
security_rules = optional(list(object({
name = string
priority = number
direction = string
access = string
protocol = string
source_port_range = string
destination_port_range = string
source_address_prefix = string
destination_address_prefix = string
})), [])
}))
is_natgateway = optional(bool, false)
service_delegation = optional(bool, false)
delegation_name = optional(string, "")
delegation_actions = optional(list(string), [])
}))
default = { }
}
variable "subnet_type" {
description = "Type of subnets to create (simple or dynamic)"
type = string
default = "subnet_simple"
}
variable "subnet_bits" {
description = "Number of simple subnets to create"
type = number
default = 0
}
variable "common_tags" {
type = map(string)
description = "A map of tags to add to all resources"
default = {
Project = "VNet"
Managed-By = "TTN"
}
}
variable "name_prefix" {
type = string
description = "A project name prefix for Route Table"
default = "vnet"
}
variable "default_tags" {
type = map(string)
description = "A map to add common tags to all the resources"
default = {
"Scope" : "VNET-SETUP"
"CreatedBy" : "Terraform"
}
}