-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
130 lines (116 loc) · 2.64 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
variable "auto_create_subnetworks" {
type = bool
default = false
description = "When creating a network, auto create subnetworks?"
}
variable "disk_size" {
type = number
default = 10
description = "Root disk size in GiB"
}
variable "disks" {
type = list(object({
source = string,
name = string,
}))
default = []
description = "List of disks to attach"
}
variable "dns" {
type = object({
name = string
ttl = optional(number)
type = optional(string)
zone = string
})
description = "DNS properties for the record to associate with the instance"
default = null
}
variable "github_user" {
type = string
description = "A GitHub user to lookup allowed SSH keys"
}
variable "firewall" {
# Default value duplicated to allow setting `ip_mask` and `ip_name` without specifying `allow`.
type = object({
other = optional(map(map(list(string))), {})
self = optional(object({
allow = optional(map(list(string)), {
icmp = []
tcp = ["22"]
})
ip_mask = optional(number)
ip_num = optional(number)
}), {
allow = {
icmp = []
tcp = ["22"]
}
}
)
})
description = "Firewall specification, passing null will prevent adding default rules"
default = {}
}
variable "image" {
type = object({
project = string
family = string
})
default = {
project = "ubuntu-os-cloud"
family = "ubuntu-2404-lts-amd64"
}
description = "Image specification"
}
variable "machine_type" {
type = string
default = "e2-micro"
description = "Instance type"
}
variable "max_run_seconds" {
type = number
default = 86400 # 24 hours
description = "Maximum run duration in seconds"
}
variable "metadata" {
type = map(string)
default = {}
description = "A map of metadata values"
}
variable "name" {
type = string
default = null
description = "Name of the instance"
}
variable "network" {
type = string
default = null
description = "Network name"
}
variable "service_account" {
type = object({
name = string
scopes = optional(list(string), ["cloud-platform"])
})
default = null
description = "Optional service account to associate with the instance"
}
variable "ssh_user" {
type = string
default = ""
description = "A user name to set for authorized SSH keys, defaults to `github_user`"
}
variable "subnets" {
type = list(object({
cidr = string
name = optional(string)
tier = optional(string, "PREMIUM")
})
)
default = [
{
cidr = "10.1.0.0/24"
}
]
}