From 34650ae62137854918627060baa448a03f8b3d4d Mon Sep 17 00:00:00 2001 From: Michael Gfeller Date: Tue, 28 Jun 2022 11:27:21 +0200 Subject: [PATCH] FAST - updated some READMEs about usage of *.auto.tfvars files Updated information about using the auto generated tfvars files in the "Variable configuration" section for some stages. Mainly about using globals.auto.tfvars.json instead of copying terraform.tfvars from bootstrap stage. --- fast/stages/01-resman/README.md | 7 +++---- fast/stages/02-networking-nva/README.md | 9 +++++---- fast/stages/02-networking-peering/README.md | 9 +++++---- fast/stages/02-networking-vpn/README.md | 13 +++++++------ 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/fast/stages/01-resman/README.md b/fast/stages/01-resman/README.md index a054106f..0cbaf1f4 100644 --- a/fast/stages/01-resman/README.md +++ b/fast/stages/01-resman/README.md @@ -82,16 +82,15 @@ There are two broad sets of variables you will need to fill in: To avoid the tedious job of filling in the first group of variable with values derived from other stages' outputs, the same mechanism used above for the provider configuration can be used to leverage pre-configured `.tfvars` files. -If you configured a valid path for `outputs_location` in the bootstrap stage, simply link the relevant `terraform-*.auto.tfvars.json` files from the outputs folder. For this stage, you need the `.tfvars` file compiled manually for the bootstrap stage, and the one generated by it: +If you configured a valid path for `outputs_location` in the bootstrap stage, simply link the relevant `*.auto.tfvars.json` files from the outputs folder. For this stage, you need the `globals.auto.tfvars.json` file containing global values compiled manually for the bootstrap stage, and `00-bootstrap.auto.tfvars.json` containing values derived from resources managed by the bootstrap stage: ```bash # `outputs_location` is set to `~/fast-config` +ln -s ~/fast-config/tfvars/globals.auto.tfvars.json . ln -s ~/fast-config/tfvars/00-bootstrap.auto.tfvars.json . -# also copy the tfvars file used for the bootstrap stage -cp ../00-bootstrap/terraform.tfvars . ``` -A second set of variables is specific to this stage, they are all optional so if you need to customize them, create an extra `terraform.tfvars` file or add them to the file copied from bootstrap. +A second set of variables is specific to this stage, they are all optional so if you need to customize them, create an extra `terraform.tfvars` file. Refer to the [Variables](#variables) table at the bottom of this document, for a full list of variables, their origin (e.g. a stage or specific to this one), and descriptions explaining their meaning. The sections below also describe some of the possible customizations. For billing configurations, refer to the [Bootstrap documentation on billing](../00-bootstrap/README.md#billing-account) as the `billing_account` variable is identical across all stages. diff --git a/fast/stages/02-networking-nva/README.md b/fast/stages/02-networking-nva/README.md index ed3c8309..9f17f997 100644 --- a/fast/stages/02-networking-nva/README.md +++ b/fast/stages/02-networking-nva/README.md @@ -221,17 +221,18 @@ There are two broad sets of variables you will need to fill in: To avoid the tedious job of filling in the first group of variables with values derived from other stages outputs, the same mechanism used above for the provider configuration can be used to leverage pre-configured `.tfvars` files. -If you have set a valid value for `outputs_location` in the bootstrap and in the resman stage, simply link the relevant `terraform-*.auto.tfvars.json` files from this stage's folder in the path you specified, where the `*` above is set to the name of the stage that produced it. For this stage, a single `.tfvars` file is available: +If you have set a valid value for `outputs_location` in the bootstrap and in the resman stage, simply link the relevant `*.auto.tfvars.json` files from this stage's folder in the path you specified. +The `*` above is set to the name of the stage that produced it, except for `globals.auto.tfvars.json` which is also generated by the bootstrap stage, containing global values compiled manually for the bootstrap stage. +For this stage, link the following files: ```bash # `outputs_location` is set to `~/fast-config` +ln -s ~/fast-config/tfvars/globals.auto.tfvars.json . ln -s ~/fast-config/tfvars/00-bootstrap.auto.tfvars.json . ln -s ~/fast-config/tfvars/01-resman.auto.tfvars.json . -# also copy the tfvars file used for the bootstrap stage -cp ../00-bootstrap/terraform.tfvars . ``` -A second set of variables is specific to this stage, they are all optional so if you need to customize them, add them to the file copied from bootstrap. +A second set of variables is specific to this stage, they are all optional so if you need to customize them, create an extra `terraform.tfvars` file. Please, refer to the [variables](#variables) table below for a map of the variable origins, and use the sections below to understand how to adapt this stage to your networking configuration. diff --git a/fast/stages/02-networking-peering/README.md b/fast/stages/02-networking-peering/README.md index a4beab1a..626af1b8 100644 --- a/fast/stages/02-networking-peering/README.md +++ b/fast/stages/02-networking-peering/README.md @@ -151,17 +151,18 @@ There are two broad sets of variables you will need to fill in: To avoid the tedious job of filling in the first group of variables with values derived from other stages' outputs, the same mechanism used above for the provider configuration can be used to leverage pre-configured `.tfvars` files. -If you have set a valid value for `outputs_location` in the bootstrap and in the resman stage, simply link the relevant `terraform-*.auto.tfvars.json` files from this stage's folder in the path you specified, where the `*` above is set to the name of the stage that produced it. For this stage, a single `.tfvars` file is available: +If you have set a valid value for `outputs_location` in the bootstrap and in the resman stage, simply link the relevant `*.auto.tfvars.json` files from this stage's folder in the path you specified. +The `*` above is set to the name of the stage that produced it, except for `globals.auto.tfvars.json` which is also generated by the bootstrap stage, containing global values compiled manually for the bootstrap stage. +For this stage, link the following files: ```bash # `outputs_location` is set to `~/fast-config` +ln -s ~/fast-config/tfvars/globals.auto.tfvars.json . ln -s ~/fast-config/tfvars/00-bootstrap.auto.tfvars.json . ln -s ~/fast-config/tfvars/01-resman.auto.tfvars.json . -# also copy the tfvars file used for the bootstrap stage -cp ../00-bootstrap/terraform.tfvars . ``` -A second set of variables is specific to this stage, they are all optional so if you need to customize them, add them to the file copied from bootstrap. +A second set of variables is specific to this stage, they are all optional so if you need to customize them, create an extra `terraform.tfvars` file. Please refer to the [Variables](#variables) table below for a map of the variable origins, and to the sections below on how to adapt this stage to your networking configuration. diff --git a/fast/stages/02-networking-vpn/README.md b/fast/stages/02-networking-vpn/README.md index 4924ca6b..a1de758c 100644 --- a/fast/stages/02-networking-vpn/README.md +++ b/fast/stages/02-networking-vpn/README.md @@ -157,17 +157,18 @@ There are two broad sets of variables you will need to fill in: To avoid the tedious job of filling in the first group of variables with values derived from other stages' outputs, the same mechanism used above for the provider configuration can be used to leverage pre-configured `.tfvars` files. -If you have set a valid value for `outputs_location` in the bootstrap and in the resman stage, simply link the relevant `terraform-*.auto.tfvars.json` files from this stage's folder in the path you specified, where the `*` above is set to the name of the stage that produced it. For this stage, a single `.tfvars` file is available: +If you have set a valid value for `outputs_location` in the bootstrap and in the resman stage, simply link the relevant `*.auto.tfvars.json` files from this stage's folder in the path you specified. +The `*` above is set to the name of the stage that produced it, except for `globals.auto.tfvars.json` which is also generated by the bootstrap stage, containing global values compiled manually for the bootstrap stage. +For this stage, link the following files: ```bash # `outputs_location` is set to `~/fast-config` -ln -s ../../configs/example/02-networking/terraform-bootstrap.auto.tfvars.json -ln -s ../../configs/example/02-networking/terraform-resman.auto.tfvars.json -# also copy the tfvars file used for the bootstrap stage -cp ../00-bootstrap/terraform.tfvars . +ln -s ~/fast-config/tfvars/globals.auto.tfvars.json . +ln -s ~/fast-config/tfvars/00-bootstrap.auto.tfvars.json . +ln -s ~/fast-config/tfvars/01-resman.auto.tfvars.json . ``` -A second set of variables is specific to this stage, they are all optional so if you need to customize them, add them to the file copied from bootstrap. +A second set of variables is specific to this stage, they are all optional so if you need to customize them, create an extra `terraform.tfvars` file. Please refer to the [Variables](#variables) table below for a map of the variable origins, and to the sections below on how to adapt this stage to your networking configuration.