-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
170 lines (141 loc) · 4.93 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Common Variables
variable "project" {
description = "Your GCP Project ID"
type = string
}
variable "zone" {
description = "The GCP Zone for Vertex Notebook User-Managed Instances"
type = string
default = "europe-west1-b"
}
variable "region" {
description = "The GCP region for the GCS bucket and Artifact Registry"
type = string
default = "europe-west1"
}
# Notebooks Variables
variable "notebooks" {
description = "A map containing the containing the configuration for the desired Vertex AI Workbench User-Managed Notebooks"
type = map(object({
labels = map(string),
instance_owner = string,
metadata = map(string),
type = string,
access_type = optional(string)
}))
default = {}
}
variable "image_project" {
description = "GCP Project conataining VM image for the Notebook instances"
type = string
default = "deeplearning-platform-release"
}
variable "image_family" {
description = "Image family for the Notebook instances (https://cloud.google.com/compute/docs/images)"
type = string
default = "common-cpu"
}
variable "machine_type" {
description = "The Notebook Instance's machine type"
type = string
default = "n1-standard-4"
}
variable "boot_disk_type" {
description = "Boot disk type for notebook instances. Possible values are DISK_TYPE_UNSPECIFIED, PD_STANDARD, PD_SSD and PD_BALANCED"
type = string
default = "PD_STANDARD"
}
variable "boot_disk_size_gb" {
description = "The size of the boot disk in GB attached to notebook instances, up to a maximum of 64 TB. The minimum recommended value is 100GB."
type = number
default = 100
}
variable "data_disk_size_gb" {
description = "The size of the data disk in GB attached to notebook instances, up to a maximum of 64 TB. You can choose the size of the data disk based on how big your notebooks and data are."
type = number
default = 100
}
variable "no_remove_data_disk" {
description = "If true, the data disk will not be auto deleted when deleting the instance."
type = bool
default = true
}
variable "install_gpu_driver" {
description = "Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs."
type = string
default = false
}
variable "accelerator_type" {
description = "Type of accelerator. Possible values are ACCELERATOR_TYPE_UNSPECIFIED, NVIDIA_TESLA_K80, NVIDIA_TESLA_P100, NVIDIA_TESLA_V100, NVIDIA_TESLA_P4, NVIDIA_TESLA_T4, NVIDIA_TESLA_T4_VWS, NVIDIA_TESLA_P100_VWS, NVIDIA_TESLA_P4_VWS, NVIDIA_TESLA_A100, TPU_V2, and TPU_V3"
type = string
default = "ACCELERATOR_TYPE_UNSPECIFIED"
}
variable "accelerator_core_count" {
description = "Count cores of accelerator."
type = number
default = 1
}
variable "access_type" {
description = "Access type for Runtime Notebooks. Possible values are SINGLE_USER, SERVICE_ACCOUNT and RUNTIME_ACCESS_TYPE_UNSPECIFIED"
type = string
default = "SINGLE_USER"
}
# IAM Variables
variable "additional_vertex_nb_sa_roles" {
description = "Additional roles that you may want to assign to the Vertex AI NB SA"
type = list(string)
default = []
}
# VPC Network Variables
variable "vpc_network_name" {
description = "The name of your VPC Network"
type = string
}
variable "subnet_ip_cidr_range" {
description = "The name of your VPC Subnetwork"
type = string
default = "10.0.0.0/21"
}
# DNS Variables
variable "vpc_sc_enabled" {
description = "A boolean flag to signal whether this enviornment is inside a VPC SC Perimeter"
type = bool
default = false
}
# GCS Bucket Name
variable "gcs_bucket_name" {
description = "Name of the GCS Bucket that will contain the post startup script"
type = string
}
variable "gcs_labels" {
description = "Labels to attach to the GCS Bucket. Useful for labelling resources for billing purposes"
type = map(string)
default = null
}
# Firewall Rules Variables
variable "additional_fw_rules" {
description = "Additional firewall rules that you may want to create to allow other traffic"
type = list(object({
name = string
description = string
direction = string
priority = number
ranges = list(string)
source_tags = optional(list(string))
source_service_accounts = optional(list(string))
target_tags = optional(list(string))
target_service_accounts = optional(list(string))
allow = list(object({
protocol = string
ports = list(string)
}))
deny = list(object({
protocol = string
ports = list(string)
}))
log_config = optional(object({
metadata = string
}))
}))
default = []
}