So this is going to be a giant PITA for us developing locally, but we need to change our recommended file names for dev params and connections to:
_connections.auto.tfvars.json
_params.auto.tfvars.json
We’ll need to generate these as a part of the bundle and app templates and include them in the gitignore. If developers want to use other auto.tfvars.json files, thats fine, but these ones are where we should be injecting params and connections. Its where we put them in xo, and now we need to surface that in app templates.
[x] Add {"_comment": "Purpose of this file"} for each of those files to our tf and app templates. Fun fact, you can make an app template by running mass bundle new and changing the type to an application and adding in the interpolators, so we technically only need to do this in our cli’s terraform template! :party:
[x] update all pre-commits w/ new files for validation input params
[x] Locally we’ll all need to change the file names for development, nbd for bundles when you do this, but for apps they won’t work until they are using this naming convention.
[x] We’ll need to add those two files to all .gitignore files, I have a script to bulk modify the repos. The ignore rule should be for the file name in any directory for the case of multi-step builds
[x] tf_helper.rb scripts will need to remove their explicit loading of dev.* files. I can bulk manage these w/ a script too, not sure if we have any special versions of this script
[x] xo will need to write data to the same path as above. We are using _ as a prefix so they are all grouped together when developing. @chrisghill I think you can technically change this whenever
The full list of files should be:
# Generated JSON Schemas for the massdriver UI
schema-artifacts.json
schema-connections.json
schema-params.json
schema-ui.json
# Auto generated terraform variable files
_connections_variables.tf.json
_md_variables.tf.json
_params_variables.tf.json
# For setting variable input values during local development
_connections.auto.tfvars.json
_params.auto.tfvars.json
So this is going to be a giant PITA for us developing locally, but we need to change our recommended file names for dev params and connections to:
_connections.auto.tfvars.json
_params.auto.tfvars.json
We’ll need to generate these as a part of the bundle and app templates and include them in the gitignore. If developers want to use other auto.tfvars.json files, thats fine, but these ones are where we should be injecting params and connections. Its where we put them in xo, and now we need to surface that in app templates.
{"_comment": "Purpose of this file"}
for each of those files to our tf and app templates. Fun fact, you can make an app template by running mass bundle new and changing the type to an application and adding in the interpolators, so we technically only need to do this in our cli’s terraform template! :party:.gitignore
files, I have a script to bulk modify the repos. The ignore rule should be for the file name in any directory for the case of multi-step buildstf_helper.rb
scripts will need to remove their explicit loading ofdev.*
files. I can bulk manage these w/ a script too, not sure if we have any special versions of this scriptxo
will need to write data to the same path as above. We are using_
as a prefix so they are all grouped together when developing. @chrisghill I think you can technically change this wheneverThe full list of files should be: