FAST: README.md fixes

This commit is contained in:
Simone Ruffilli 2022-02-24 11:21:06 +01:00
parent 25707adfba
commit ab4a8eb78a
2 changed files with 8 additions and 4 deletions

View File

@ -189,7 +189,9 @@ organization={
}
# create your own 4-letters prefix
prefix="fast"
outputs_location = "../../fast-config"
# comment out if you want to leverage automatic generation of configs
# outputs_location = "~/fast-config"
```
### Output files and cross-stage variables
@ -199,9 +201,11 @@ At any time during the life of this stage, you can configure it to automatically
Automatic generation of files is disabled by default. To enable the mechanism, set the `outputs_location` variable to a valid path on a local filesystem, e.g.
```hcl
outputs_location = "../../config"
outputs_location = "~/fast-config"
```
This is especially suited for initial bootstrapping and development. You might want to adapt it to your practices for production deployments.
Once the variable is set, `apply` will generate and manage providers and variables files, including the initial one used for this stage after the first run. You can then link these files in the relevant stages, instead of manually transfering outputs from one stage, to Terraform variables in another.
Below is the outline of the output files generated by all stages:
@ -238,8 +242,8 @@ terraform apply \
Once the initial `apply` completes successfully, configure a remote backend using the new GCS bucket, and impersonation on the automation service account for this stage. To do this you can use the generated `providers.tf` file if you have configured output files as described above, or extract its contents from Terraform's output, then migrate state with `terraform init`:
```bash
# if using output files via the outputs_location and set to `../../config`
ln -s ../../config/providers/00-bootstrap* ./
# if using output files via the outputs_location and set to `~/fast-config`
ln -s ~/fast-config/providers/00-bootstrap* ./
# or from outputs if not using output files
terraform output -json providers | jq -r '.["00-bootstrap"]' \
> providers.tf