Skip to content

Commit 233600d

Browse files
Liam-Johnstonkarpok78
authored andcommitted
feat: include network tfvars in project factory (GoogleCloudPlatform#2813)
1 parent fe1cfeb commit 233600d

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

fast/stages/1-resman/outputs-cicd.tf

+27-6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,31 @@
1818

1919
locals {
2020
# render CI/CD workflow templates
21+
22+
_stage_2_cicd_workflow_var_files = {
23+
security = [
24+
"0-bootstrap.auto.tfvars.json",
25+
"1-resman.auto.tfvars.json",
26+
"0-globals.auto.tfvars.json"
27+
]
28+
networking = [
29+
"0-bootstrap.auto.tfvars.json",
30+
"1-resman.auto.tfvars.json",
31+
"0-globals.auto.tfvars.json"
32+
]
33+
network_security = [
34+
"0-bootstrap.auto.tfvars.json",
35+
"1-resman.auto.tfvars.json",
36+
"0-globals.auto.tfvars.json"
37+
]
38+
project_factory = [
39+
"0-bootstrap.auto.tfvars.json",
40+
"1-resman.auto.tfvars.json",
41+
"0-globals.auto.tfvars.json",
42+
"2-networking.auto.tfvars.json"
43+
]
44+
}
45+
2146
cicd_workflows = {
2247
for k, v in local.cicd_repositories : "${v.level}-${replace(k, "_", "-")}" => templatefile(
2348
"${path.module}/templates/workflow-${v.repository.type}.yaml", {
@@ -40,12 +65,8 @@ locals {
4065
plan = local.cicd_workflow_providers["${k}-r"]
4166
}
4267
tf_var_files = (
43-
v.level == 2
44-
? [
45-
"0-bootstrap.auto.tfvars.json",
46-
"0-globals.auto.tfvars.json",
47-
"1-resman.auto.tfvars.json"
48-
]
68+
v.level == 2 ?
69+
local._stage_2_cicd_workflow_var_files[k]
4970
: [
5071
"0-bootstrap.auto.tfvars.json",
5172
"0-globals.auto.tfvars.json",

0 commit comments

Comments
 (0)