-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
144 lines (134 loc) · 3.82 KB
/
variables.tf
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
variable "static_ip_name" {
type = string
description = "Create static external IP address"
}
variable "zone_id" {
description = "Set zone id for static IP address"
type = string
default = "ru-central1-a"
}
variable "create_vpc" {
type = bool
default = true
description = "Shows whether a VCP object should be created. If false, an existing `vpc_id` is required."
}
variable "create_sg" {
type = bool
default = true
description = "Shows whether а security group for VCP object should be created"
}
variable "vpc_id" {
type = string
default = null
description = "Existing `network_id` (`vpc-id`) where resources will be created"
}
variable "network_name" {
description = "Prefix to be used with all the resources as an identifier"
type = string
}
variable "network_description" {
description = "Optional description of this resource. Provide this property when you create the resource."
type = string
default = "terraform-created"
}
variable "folder_id" {
type = string
default = null
description = "Folder ID where the resources will be created"
}
variable "public_subnets" {
description = <<EOF
"Describe your public subnet preferences. For VMs with public IPs. For Multi-Folder VPC add folder_ids to subnet objects"
Example:
public_subnets = [
{
"v4_cidr_blocks" : ["10.121.0.0/16", "10.122.0.0/16"],
"zone" : "ru-central1-a"
"description" : "Custom public-subnet description"
"name" : "Custom public-subnet name"
},
{
"v4_cidr_blocks" : ["10.131.0.0/16"],
"zone" : "ru-central1-b"
"folder_id" : "xxxxxxx" # For Multi-Folder VPC
},
]
EOF
type = list(object({
v4_cidr_blocks = list(string)
zone = string
description = optional(string)
name = optional(string)
folder_id = optional(string)
}))
default = null
}
variable "private_subnets" {
description = <<EOF
"Describe your private subnet preferences. For VMs without public IPs but with or without NAT gateway. For Multi-Folder VPC add folder_id to subnet object"
private_subnets = [
{
"v4_cidr_blocks" : ["10.221.0.0/16"],
"zone" : "ru-central1-a"
"description" : "Custom private-subnet description"
"name" : "Custom private-subnet name"
},
{
"v4_cidr_blocks" : ["10.231.0.0/16"],
"zone" : "ru-central1-b"
"folder_id" : "xxxxxxx" # For Multi-Folder VPC
},
]
EOF
type = list(object({
v4_cidr_blocks = list(string)
zone = string
description = optional(string)
name = optional(string)
folder_id = optional(string)
}))
default = null
}
variable "create_nat_gw" {
description = "Create a NAT gateway for internet access from private subnets"
type = bool
default = true
}
variable "routes_public_subnets" {
description = "Describe your route preferences for public subnets"
type = list(object({
destination_prefix = string
next_hop_address = string
}))
default = null
}
variable "routes_private_subnets" {
description = "Describe your route preferences for public subnets"
type = list(object({
destination_prefix = string
next_hop_address = string
}))
default = null
}
variable "domain_name" {
type = string
default = "internal."
description = "Domain name to be added to DHCP options"
}
variable "domain_name_servers" {
type = list(string)
default = []
description = "Domain name servers to be added to DHCP options. Only ip addresses can be used"
}
variable "ntp_servers" {
type = list(string)
default = []
description = "NTP Servers for subnets. Only ip addresses can be used"
}
variable "labels" {
description = "Set of key/value label pairs to assign."
type = map(string)
default = {
created_by = "terraform-yc-module"
}
}