@agilecustoms/envctl 0.32.2 → 0.32.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,3 +57,20 @@ big .js file (as I do for `publish-s3` and `gha-healthcheck`) but it will be har
|
|
|
57
57
|
So I ended up publishing this client as an npm package in npmjs
|
|
58
58
|
- CI environments can install it via GH action `agilecustoms/envctl`
|
|
59
59
|
- developer will install it globally via `npm install -g @agilecustoms/envctl`
|
|
60
|
+
|
|
61
|
+
## terraform init
|
|
62
|
+
|
|
63
|
+
Terraform init first time (given state configured to be in S3)
|
|
64
|
+
1. backend state metadata
|
|
65
|
+
1. terraform checks access to remote state (double-checked, tried to specify the wrong bucket, and it fails)
|
|
66
|
+
- basically it tries `s3:ListObjectsV2`. But it looks like it does not check access to the file itself
|
|
67
|
+
2. create file .terraform/terraform.tfstate with backend config (s3 bucket and key) (it does NOT download a state file itself!)
|
|
68
|
+
3. so basically if you call `terraform init` two times with different keys,
|
|
69
|
+
second time you get error "Backend configuration changed" and ask to migrate state or reconfigure
|
|
70
|
+
2. modules (can be called individually via `terraform get -update`)
|
|
71
|
+
1. download modules, put them in `.terraform/modules`
|
|
72
|
+
2. modules are loaded before providers bcz in modules can be more providers!
|
|
73
|
+
3. providers
|
|
74
|
+
1. search for the latest provider satisfying conditions in .tf files
|
|
75
|
+
2. download providers, put them in `.terraform/providers/*`
|
|
76
|
+
3. create file `.terraform.lock.hcl` with provider versions and hashes
|