-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathvariables.tf
54 lines (45 loc) · 1.65 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
# Variables declaration
variable "project_id" {
type = string
description = "The ID of the google project to house the resources."
}
variable "default_region" {
type = string
description = "The default region to create the google cloud regional resources."
}
variable "default_zone" {
type = string
description = "The default zone to create the google cloud zonal resources."
}
variable "terraform_service_account" {
type = string
description = "Terraform service account to execute the terraform code."
# Make sure to give "roles/iam.serviceAccountTokenCreator" role to an identity (who will trigger the terraform code) on this service account for the impersonation to succeed.
}
variable "vpc_name" {
description = "The name of the VPC network being created."
type = string
default = "my-vpc"
validation {
condition = (
length(var.vpc_name) >= 1 && length(var.vpc_name) <= 62
)
error_message = "VPC name must be between 1 and 62 characters long."
}
}
variable "auto_create_subnetworks" {
type = bool
description = "When set to true, the network is created in auto subnet mode and it will create a subnet for each region automatically across the 10.128.0.0/9 address range."
}
variable "delete_default_routes" {
type = bool
description = "If set to true, default routes (0.0.0.0/0) will be deleted immediately after network creation."
}
variable "subnet_name" {
type = list(string)
description = "The list of names of the subnets to be created."
}
variable "subnet_cidr" {
type = list(string)
description = "The list of the CIDR range of the subnets."
}