Repository navigation
feat(0-bootstrap): support pre-created projects and workloads - #355
Merged
aghassemlouei merged 1 commit intoOct 26, 2026
Merged
Conversation
Some organizations create the Stage 0 projects and the Assured Workloads workload outside Terraform, for example when only a human user can use the billing account, and import them into the stage state. - Add the project_deletion_policies variable so imported projects can survive terraform destroy with ABANDON; every key defaults to DELETE. - Ignore changes to the workload resource_settings, which the API never returns, so an imported workload does not plan a replacement. - Document pre-created resources in the stage README.
This was referenced Oct 24, 2026
aghassemlouei
approved these changes
Oct 26, 2026
aghassemlouei
left a comment
Member
There was a problem hiding this comment.
Verified locally with tools/run_tests.sh, tools/lint.sh, and Terraform variable validation. Wiring project_deletion_policies to the three Stage 0 projects and adding resource_settings to lifecycle.ignore_changes on google_assured_workloads_workload.primary cleanly supports importing pre-created workloads and shared-billing projects without planning a replacement.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Import pre-created Stage 0 projects and the Assured Workloads workload without Terraform replacing or later deleting them.
Some organizations create the automation, log export, or billing export project and the Assured Workloads workload outside Terraform, for example when only a human user can use the billing account. They then import these resources into the Stage 0 state. Two gaps break that flow today.
modules/project/module already exposes adeletion_policyinput, but thefast/stages-aw/0-bootstrap/stage never passes it, so a destroy deletes every imported project.resource_settingsfield, so an imported workload plans a replacement, and the replacement fails without billing access.The change closes both gaps.
project_deletion_policiesobject variable hasautomation,billing, andloggingkeys.project_parent_idsvariable.DELETE, so existing deployments plan no change.ABANDONvalue removes the project from the Terraform state on destroy and leaves the project in the organization.PREVENTvalue makes Terraform refuse any destroy action on the project.deletion_policyvariable in the project module.google_assured_workloads_workload.primaryresource now ignores changes to theresource_settingsargument as well as thebilling_accountargument.display_nameargument.tests/test_bootstrap_precreated.pytest file checks the module wiring, the defaults, the allowed values, and the ignored workload fields.No GitHub issue exists for this change. The
stellarCLI work in #306 uses the new variable.Type of Change
Deployment & Compliance Impact
Checklist
Code Quality & Reusability
modules/orfast/stages-aw/can be leveraged for this change.docs/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
terraform init -backend=falseandterraform validatein thefast/stages-aw/0-bootstrap/stage report a valid configuration.terraform testrun with an uncommitted.tftest.hclfile and mockgoogleandgoogle-betaproviders plansdeletion_policy = "DELETE"on all threegoogle_project.project[0]resources with the defaults.ABANDONon the automation and log export projects andPREVENTon the billing export project.KEEPfails the variable validation.mainexactly, with 327 resources in both.tools/tfdoc.pyregenerated the README table, andtools/check_documentation.pypasses for the stage.terraform fmt -checkpasses for the stage.tools/lint.shpasses every check except the tflint step, because tflint is not installed locally.tools/run_tests.shpasses, including the 107 unit tests.deletion_policyline from one module makes the new test fail.tftest.yamlinventory covers the stage, so no inventory changed.terraform validatepasses after theignore_changesupdate.resource_settingsargument leaves theignore_changeslist.