chore(terraform): complete staging SPA adoption

Pin staging adoption_complete to true so tags and the bucket policy
match the already-adopted dev root.
This commit is contained in:
Adam Moussa 2026-09-18 16:14:10 -04:00
parent 95f0342271
commit 7b37529006
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -340,13 +340,13 @@ class ImportPlanCheckerTests(unittest.TestCase):
self.assertFalse((REPOSITORY / "terraform" / "versions.tf").exists()) self.assertFalse((REPOSITORY / "terraform" / "versions.tf").exists())
self.assertFalse((REPOSITORY / "terraform" / "main.tf").exists()) self.assertFalse((REPOSITORY / "terraform" / "main.tf").exists())
def test_dev_adoption_complete_is_pinned_in_locals(self) -> None: def test_adoption_complete_is_pinned_in_locals(self) -> None:
dev = (REPOSITORY / "terraform/live/dev/main.tf").read_text(encoding="utf-8") dev = (REPOSITORY / "terraform/live/dev/main.tf").read_text(encoding="utf-8")
staging = (REPOSITORY / "terraform/live/staging/main.tf").read_text( staging = (REPOSITORY / "terraform/live/staging/main.tf").read_text(
encoding="utf-8" encoding="utf-8"
) )
self.assertRegex(dev, r"adoption_complete\s+= true") self.assertRegex(dev, r"adoption_complete\s+= true")
self.assertRegex(staging, r"adoption_complete\s+= false") self.assertRegex(staging, r"adoption_complete\s+= true")
self.assertNotIn('variable "adoption_complete"', dev) self.assertNotIn('variable "adoption_complete"', dev)
self.assertNotIn('variable "environment"', dev) self.assertNotIn('variable "environment"', dev)
self.assertNotIn('variable "release_version_label"', dev) self.assertNotIn('variable "release_version_label"', dev)

View file

@ -1,7 +1,7 @@
# Live Terraform roots # Live Terraform roots
`live/dev/` is the adopted HCP workspace `shoc-frontend-new-dev`. `live/dev/` is the adopted HCP workspace `shoc-frontend-new-dev`.
`live/staging/` is `shoc-frontend-new-staging` (`adoption_complete = false`). `live/staging/` is `shoc-frontend-new-staging` (`adoption_complete = true`).
Do not collapse these into one `terraform/` root in the same PR as application Do not collapse these into one `terraform/` root in the same PR as application
CD. Flattening retargets two live HCP working directories and belongs in its CD. Flattening retargets two live HCP working directories and belongs in its

View file

@ -1,6 +1,6 @@
locals { locals {
# Staging is not fully adopted. Pinned in code, never a workspace variable. # Controlled ownership transfer. Pinned in code, never a workspace variable.
adoption_complete = false adoption_complete = true
environment = "staging" environment = "staging"
workspace_name = "shoc-frontend-new-staging" workspace_name = "shoc-frontend-new-staging"