You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time someone wants to override something in the bootstrap scripts this involves placing the environment variable in config-default.sh and modifying --extra-vars for Ansible.
We have a similar issue for terraform where we need to modify util.sh to add -var ... on to the terraform plan.
This is not really scalable.
Proposal
Part of the solution is to move to using terraform environment variables (introduced in terraform 0.5). See #148
The other idea is to handle any environment variables by doing something like the following -
namespace all environment variables APOLLO_
on bootstrap loop all APOLLO_ env variables and build up --extra-vars from those
e.g.
APOLLO_CONSUL_DC=eu-west-1 would become --extra-vars "consul_dc=eu-west-1"
This means when we add new features we do not need to surface any extra code in the bootstrap scripts
The text was updated successfully, but these errors were encountered:
I like how we solve this in #138 for ansible. I would keep that approach (even if we split the PR )
For terraform even if we do the same approach and we allow to override via "APOLLO_", then "TF_VAR_name" will still be avalable once we move to 0.5.0 so they are compatible.
If we follow "APOLLO_" approach we need do differentiate some how between ansible and terraform otherwise we could end up with variables overlapping between the tools. So we would nee to do something like "APOLLO_TF" which makes me think why dont we just use "TF_VAR_name". So cant see a real benefit for using custom approach for terraform right now appart from cross tool project consistency. I think terraform question will be answered itself once the apollo plugin concept for terraform becomes more clear (see #140) so then we can line up with ansible related plugins.
for terraform - I would agree - lets just use TF_VAR_ - no point adding an additional layer here that does nothing. Let's just bump the minimum version as part of that PR - we could additionally put a check in verify-prereqs to check we are on at least 0.5.0 of terraform
Problem
Every time someone wants to override something in the bootstrap scripts this involves placing the environment variable in
config-default.sh
and modifying--extra-vars
for Ansible.We have a similar issue for terraform where we need to modify
util.sh
to add-var ...
on to the terraform plan.This is not really scalable.
Proposal
Part of the solution is to move to using terraform environment variables (introduced in terraform 0.5). See #148
The other idea is to handle any environment variables by doing something like the following -
APOLLO_
APOLLO_
env variables and build up --extra-vars from thosee.g.
APOLLO_CONSUL_DC=eu-west-1
would become--extra-vars "consul_dc=eu-west-1"
This means when we add new features we do not need to surface any extra code in the bootstrap scripts
The text was updated successfully, but these errors were encountered: