File tree Expand file tree Collapse file tree 5 files changed +29
-2
lines changed
docs/modules/ROOT/pages/references
golden/cloudscale/openshift4-terraform/openshift4-terraform Expand file tree Collapse file tree 5 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ parameters:
12
12
git : {}
13
13
provider : ${facts:cloud}
14
14
version : ${openshift4_terraform:_tf_module_version:${openshift4_terraform:provider}}
15
+ additional_outputs : {}
15
16
terraform_variables :
16
17
source : git::https://github.com/appuio/terraform-openshift4-${openshift4_terraform:provider}.git//?ref=${openshift4_terraform:version}
17
18
cluster_id : ${cluster:name}
Original file line number Diff line number Diff line change @@ -74,12 +74,13 @@ local terraform_config =
74
74
},
75
75
},
76
76
},
77
+ local mergedOutputs = params.additional_outputs + outputs[params.provider],
77
78
'outputs.tf' : {
78
79
output: {
79
80
[out]: {
80
- value: outputs[params.provider] [out],
81
+ value: mergedOutputs [out],
81
82
}
82
- for out in std.objectFields (outputs[params.provider] )
83
+ for out in std.objectFields (mergedOutputs )
83
84
},
84
85
},
85
86
'variables.tf' : {
Original file line number Diff line number Diff line change @@ -62,6 +62,26 @@ Terraform input variables for the selected Terraform module (see parameter `prov
62
62
They're passed to the module without any further processing.
63
63
The variables are merged with the defaults, unless overridden.
64
64
65
+
66
+ == `additional_outputs`
67
+
68
+ [horizontal]
69
+ type:: object
70
+ default:: `{}`
71
+ example::
72
+ +
73
+ [source,yaml]
74
+ ----
75
+ additional_outputs:
76
+ my_output: '\${module.cluster.my_output}'
77
+ ----
78
+
79
+ Additional outputs that are passed to the Terraform module.
80
+ The outputs are merged with the defaults, defaults can't be overridden.
81
+ The keys are then name of the output, the value should contain a reference to a output variable from the Terraform module.
82
+ Additional escaping might be needed since Terraform variables use the same syntax as reclass; see the example above.
83
+
84
+
65
85
== `version`
66
86
67
87
[horizontal]
Original file line number Diff line number Diff line change @@ -14,3 +14,5 @@ parameters:
14
14
- ssh-ed25519 AA...
15
15
control_vshn_net_token : asdf...
16
16
hieradata_repo_user : project_123_bot
17
+ additional_outputs :
18
+ region : ' \${module.cluster.region}'
Original file line number Diff line number Diff line change 5
5
},
6
6
"hieradata_mr" : {
7
7
"value" : " ${module.cluster.hieradata_mr}"
8
+ },
9
+ "region" : {
10
+ "value" : " ${module.cluster.region}"
8
11
}
9
12
}
10
13
}
You can’t perform that action at this time.
0 commit comments