-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
122 lines (103 loc) · 3.6 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
# Copyright (c) University College London Hospitals NHS Foundation Trust
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
variable "bootstrap_id" {
description = "Unique suffix to apply to resource names/ids"
type = string
validation {
condition = length(var.bootstrap_id) <= 12
error_message = "Must be 12 chars or less"
}
validation {
condition = can(regex("^[a-z0-9\\_-]*$", var.bootstrap_id))
error_message = "Cannot contain spaces, uppercase or special characters except '-' and '_'"
}
}
variable "location" {
description = "The location to deploy resources"
type = string
validation {
condition = can(regex("[a-z]+", var.location))
error_message = "Only lowercase letters allowed"
}
}
variable "environment" {
description = "Environment name to differentiate deployments (ie. dev, prod)"
type = string
validation {
condition = length(var.environment) <= 12
error_message = "Must be 12 chars or less"
}
validation {
condition = can(regex("^[a-z0-9\\_-]*$", var.environment))
error_message = "Cannot contain spaces, uppercase or special characters except '-' and '_'"
}
}
variable "tags" {
description = "Map of string to add as resource tags to all deployed resources"
type = map(string)
default = {}
}
variable "github_runner_token" {
description = "Github persional access token with admin and runner scopes to be able to register GH runners"
type = string
}
variable "github_organization" {
description = "GitHub organisation in which to register the build agent (runner)"
type = string
}
variable "github_runner_version" {
description = "Release version of the GitHub runner to use"
type = string
default = "2.303.0"
validation {
condition = !startswith(var.github_runner_version, "v")
error_message = "Please remove the v prefix from the version number"
}
}
variable "github_runner_instances" {
description = "The number of GitHub runner instances to deploy"
type = number
default = 1
}
variable "address_space" {
description = "Address space for vnet. This must not overlap with any addresses that will be peered. e.g. 10.0.0.0/24"
type = string
default = "10.0.0.0/24"
}
variable "network_watcher_name" {
description = "Name of the network watcher resource in which to add the flow logs"
type = string
default = null
}
variable "network_watcher_resource_group_name" {
description = "Resource group in which the network watcher exists"
type = string
default = null
}
variable "create_private_dns_zones" {
description = <<EOF
The private DNS zones to create that are required by subsequent deployments that bootstrap
will be peered to. Will be ignored if existing_dns_zones_rg is set.
EOF
type = map(string)
default = {}
}
variable "existing_dns_zones_rg" {
description = <<EOF
The resource group name containing existing private DNS zones to link to for private links. If
unspecified, bootstrap will create the zones it requires.
EOF
type = string
default = null
}