@quantile-co/factory-pi 0.1.0 → 0.1.1
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/package.json
CHANGED
|
@@ -151,7 +151,7 @@ cp "$TF_DIR/terraform.tfstate" "$TF_DIR/terraform.tfstate.pre-gcs"
|
|
|
151
151
|
rm "$TF_DIR/backend_override.tf"
|
|
152
152
|
tofu -chdir="$TF_DIR" init -migrate-state -lockfile=readonly \
|
|
153
153
|
-backend-config="bucket=$GCP_TF_STATE_BUCKET" \
|
|
154
|
-
-backend-config="prefix
|
|
154
|
+
-backend-config="prefix=${GH_REPO#*/}/prod/infrastructure"
|
|
155
155
|
tofu -chdir="$TF_DIR" state list
|
|
156
156
|
tofu -chdir="$TF_DIR" plan # expect no changes; keep the ignored backup securely until verified
|
|
157
157
|
unset GITHUB_TOKEN # gh run watch cannot use the Terraform fine-grained PAT
|
|
@@ -30,8 +30,12 @@ is passed as `--tf-layer` to the repository's pnpm task/app. That repository map
|
|
|
30
30
|
the layer internally to its directory and existing backend prefix. Shared YAML
|
|
31
31
|
contains neither directory nor backend-prefix arguments. Set
|
|
32
32
|
`github.workflows.layers` to the supported subset. Factory selects Infrastructure
|
|
33
|
-
only, mapped by its app to `tf/infrastructure
|
|
34
|
-
|
|
33
|
+
only, mapped by its app to `tf/infrastructure`, with the source target
|
|
34
|
+
`factory/prod/infrastructure`. Backend prefixes follow
|
|
35
|
+
`<repository-name>/<environment>/<tf-layer>`, preserving dots in repository names.
|
|
36
|
+
Changing an existing prefix requires a separately approved same-lineage state
|
|
37
|
+
migration before activating its new source mapping; never initialize an empty
|
|
38
|
+
backend as a replacement. Plan and Apply must select the same layer.
|
|
35
39
|
|
|
36
40
|
A synthetic owner-roster example, not identities to deploy:
|
|
37
41
|
|
|
@@ -101,9 +101,12 @@ Check may have run on the source branch before fast-forwarding main. Confirm its
|
|
|
101
101
|
exact SHA, not just the branch label. Inspect current production activity; never
|
|
102
102
|
cancel another operator's job. Verify main/prod restrictions, WIF and IAM,
|
|
103
103
|
the effective state bucket and backend prefix, including caller inputs and runtime
|
|
104
|
-
environment overrides.
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
environment overrides. New prefixes use
|
|
105
|
+
`<repository-name>/<environment>/<tf-layer>`; Factory's source target is
|
|
106
|
+
`factory/prod/infrastructure`. Verify that the existing lineage has been migrated
|
|
107
|
+
before activating a changed prefix. A source edit, empty-backend initialization
|
|
108
|
+
or `init -reconfigure` is not a state migration. Check the called workflow's
|
|
109
|
+
`factory-production` concurrency and any caller guard.
|
|
107
110
|
The Terraform root's reviewed paired records are the source of truth for platform
|
|
108
111
|
permissions, including plan-reader emails and immutable deployment actor IDs.
|
|
109
112
|
Neither YAML nor the CLI reads an Actions owner roster. The YAML owner and
|