Repository navigation
NO-ISSUE: Re-enable apply on the new tofu state bucket - #267
Merged
Merged
Conversation
The MOC-hosted osac-terraform-state bucket was removed, so every apply failed at tofu init with NoSuchBucket, and osac-project#245 disabled the scheduled and push-triggered runs. The state now lives in a new osac-terraform-state bucket (us-east-1, versioned, private) in an OSAC-controlled AWS account. It was restored from the export of the last state (serial 1790), and the AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY secrets now hold a key for an IAM user scoped to that bucket. - Restore the schedule and push triggers removed by osac-project#245. - Enable native S3 state locking (use_lockfile) and require OpenTofu >= 1.10, which introduced it. - Update the README to describe the new state location. Assisted-by: Claude Code (Claude Opus 5.5) <noreply@anthropic.com> Signed-off-by: Elior Erez <eerez@redhat.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 4
✨ Finishing Touches
Comment |
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.
Summary
The MOC-hosted
osac-terraform-statebucket was removed, soApply configurationfailed attofu initwithNoSuchBucket. #245 then disabled the scheduled and push triggers. This PR turns them back on now that the state has a new home.Already done outside this PR
osac-terraform-stateinus-east-1, in an OSAC-controlled AWS account. It's versioned, blocks all public access, uses SSE-S3 encryption, and has ACLs disabled.cb7cdde1-…). The uploaded object's checksum matches the export.github-config-tofu-state, whose inline policy allows onlys3:ListBucketon the bucket andGet/Put/DeleteObjectonosac.tfstateandosac.tfstate.tflock. Its key is now in the repo'sAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYsecrets.Changes
scheduleandpushtriggers removed by Disable terraform plan/apply workflows #245.backend.tf: enable native S3 state locking (use_lockfile = true). The old backend had no locking.versions.tf: require OpenTofu>= 1.10.0, the first version withuse_lockfile. CI installs the latest.Validation
tofu fmt -check -recursive,tofu validate,pre-commit run --all-files: all pass.tofu planagainst the new bucket (personal token, which lacksadmin:org) showed 0 to destroy. Its updates match the last successful CI apply (Oct 15, 08:33 UTC) exactly: the same 7 recurring in-place updates, plus OSAC-6150: Allow stale enhancement proposal branches #265'senhancement-proposalsstrict-checks change, which hasn't been applied yet. The only "create" wasgithub_organization_role.runner_manager, an artifact of the personal token getting 404s on the org-roles API. The GitHub App token used in CI has that scope.After merge
The push trigger only fires on
*.tf/*.csvchanges. This PR changesbackend.tfandversions.tf, so merging it starts an apply automatically. Expected result:0 to add, 8 to change, 0 to destroy. If the apply instead tries to create repos, teams or memberships, the state didn't load, and we should investigate before letting it continue.🤖 Generated with Claude Code