mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 05:43:12 +00:00
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:
parent
95f0342271
commit
7b37529006
3 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue