broad-zoo-34077
07/25/2023, 8:02 AMmysterious-teacher-68276
07/25/2023, 8:28 AMred-toothbrush-65619
07/25/2023, 8:36 AMTF_VAR_Gitlab_Environment: prod or TF_VAR_Gitlab_Environment: test
TF_VAR_Greenpeace_Environment: test or TF_VAR_Greenpeace_Environment: prod
3) One comment as documentation is fine.mysterious-teacher-68276
07/25/2023, 8:50 AMenv
key of the project, e.g;
version: 0.1
projects:
- path: some/path/to/terraformcode
name: dev
terraform_vars:
Gitlab_Environment: prod
Greenpeace_Environment: test
I’m not sure if the Gitlab_Environment
is actually used in the terraform code, if not just ommit it.
You would then specify all your terraform projects by defining them in the config file. However, I’d recommend using our config template syntax as this will avoid duplication. For example you could do things like:
version: 0.1
projects:
{{- $envs := list "prod" "test"}}
{{- range $envs }}
- path: someapp
name: {{ . }}-someapp
terraform_vars:
Greenpeace_Environment: {{ . }}
{{- end }}
It’s a little bit tricky to help further without knowing your project structure. And this is probably easier to go over on a call. We can get all the config template and stuff ironed out in that. Would a call tomorrow work?red-toothbrush-65619
07/25/2023, 8:56 AM