-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
166 lines (150 loc) · 4.01 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
###########
# Variables
variable "gcp_enabled_services" {
description = "List of services to enable on the ML platform"
type = list(string)
default = [
"aiplatform.googleapis.com",
"cloudbuild.googleapis.com",
"cloudresourcemanager.googleapis.com",
"container.googleapis.com",
"containeranalysis.googleapis.com",
"containerregistry.googleapis.com",
"datacatalog.googleapis.com",
"dataflow.googleapis.com",
"dataform.googleapis.com",
"datapipelines.googleapis.com",
"cloudscheduler.googleapis.com",
"iamcredentials.googleapis.com",
"iam.googleapis.com",
"iap.googleapis.com",
"ml.googleapis.com",
"monitoring.googleapis.com",
"networkmanagement.googleapis.com",
"notebooks.googleapis.com",
"secretmanager.googleapis.com",
"vision.googleapis.com",
]
}
variable "gcp_created_folders" {
description = "List of folders to create in the main bucket on the ML platform"
type = list(string)
default = [
"raw/",
"primary/",
"pipeline_root/",
"logs/"
]
}
variable "infra_sa_roles" {
description = "List of roles to bind to this service account"
type = list(string)
default = [
"roles/owner",
"roles/serviceusage.serviceUsageAdmin"
]
}
variable "gcp_service_accounts" {
description = "A map of service account configurations, including roles, account ID, and description."
type = map(object({
roles = list(string)
sa_id = string
name = string
}))
default = {
gcp_ml_sa = {
roles = [
"roles/aiplatform.user",
"roles/artifactregistry.createOnPushWriter",
"roles/cloudbuild.builds.editor",
"roles/cloudbuild.integrations.editor",
"roles/cloudscheduler.admin",
"roles/dataflow.developer",
"roles/dataform.editor",
"roles/datapipelines.admin",
"roles/logging.logWriter",
"roles/ml.developer",
"roles/secretmanager.secretAccessor",
"roles/iam.serviceAccountUser",
"roles/iam.serviceAccountTokenCreator",
"roles/storage.admin",
]
sa_id = "neurips-ml-sa"
name = "Core ML tasks SA"
}
}
}
variable "gha_assertion_aud" {
description = "GHA workload identity JWk token aud attribute"
type = string
default = "https://github.com/CedrickArmel"
}
variable "gha_assertion_sub" {
description = "GHA workload identity JWk token sub attribute"
type = string
default = "repo:CedrickArmel/neurips_adc:ref:refs/heads/main"
}
#########
# Secrets
variable "gcp_iam_infra_sa_account_id" {
description = "Core IAM & Infra LC management SA"
type = string
sensitive = true
}
variable "gcp_project" {
description = "Google Cloud project to deploy on"
type = string
sensitive = true
}
variable "gcp_gh_pat" {
description = "GitHub Personal Access Token"
type = string
sensitive = true
}
variable "gcp_gh_token_secret_id" {
description = "ID of the secret used to authenticate the connection to GitHub."
type = string
sensitive = true
}
variable "gcp_region" {
description = "Google Cloud region to deploy on"
type = string
sensitive = true
}
variable "gcp_secrets" {
description = "Secrets stored in GCP SecretManager"
type = map(object({
id = string
data = string
}))
sensitive = true
}
variable "gcp_secrets_keys" {
type = set(string)
default = [
"bucket_secret",
"docker_username",
"docker_token",
"gh_pat_secret"
]
}
variable "hcp_terraform_org_name" {
description = "Organization name in HCP Terraform Cloud"
type = string
sensitive = true
}
variable "hcp_terraform_ws_id" {
description = "Project's worksapce in HCP Terraform Cloud"
type = string
sensitive = true
}
variable "hcp_terraform_ws_name" {
description = "Project's worksapce in HCP Terraform Cloud"
type = string
sensitive = true
}
variable "tfe_token" {
description = "Token to authenticate TFE provider"
type = string
sensitive = true
}