diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml
deleted file mode 100644
index 9cc6b50..0000000
--- a/.github/workflows/upgrade.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: Upgrade
-
-on:
- workflow_dispatch:
- inputs:
- ref:
- required: false
- description: The github-as-code ref to upgrade to
- default: master
-
-jobs:
- upgrade:
- uses: ipdxco/github-as-code/.github/workflows/upgrade_reusable.yml@master
- with:
- ref: ${{ inputs.ref }}
- secrets:
- GITHUB_APP_ID: ${{ secrets.RW_GITHUB_APP_ID }}
- GITHUB_APP_INSTALLATION_ID: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
- GITHUB_APP_PEM_FILE: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
diff --git a/README.md b/README.md
index 54652c4..735786e 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,21 @@
-
+# FilOzone GitHub Management
-
+This repository manages FilOzone's GitHub organization settings through pull requests. The FilOz team maintains it from the [ipdxco/github-as-code template](https://github.com/ipdxco/github-as-code), using a similar setup in [filecoin-project/github-mgmt](https://github.com/filecoin-project/github-mgmt).
-# GitHub Management as Code
+## Request an access change
-A robust template for managing GitHub configurations as code via Pull Requests. Designed with the effective administration of multiple medium to large-sized GitHub organizations in mind.
+1. Edit the relevant membership, team, or repository collaborator in [`github/FilOzone.yml`](github/FilOzone.yml).
+2. Open a PR to `master` and explain what access is needed and why. The [github-mgmt stewards](https://github.com/orgs/FilOzone/teams/github-mgmt-stewards) are requested to review it. Check any formatting commits and review the Terraform plan on the PR.
+3. After approval and merge, [Apply](.github/workflows/apply.yml) applies the reviewed plan. Verify the result in GitHub after the Apply run succeeds.
-
+To request that someone be removed from FilOzone, open a PR to revoke their team memberships and direct repository access. Keep their entry in `members` and add a comment explaining that an organization owner will remove them in GitHub. See the [member removal procedure](docs/INFRA_ADMIN.md#remove-a-member-from-filozone) for the steps after merge.
-## Importance of Access Control
+See [HOWTOS](docs/HOWTOS.md) for configuration examples and the [infrastructure admin guide](docs/INFRA_ADMIN.md) for operating the workflows and Terraform backend.
-**NOTE**: Possessing write access to the GitHub Management repository can equate to having administrative privileges over the organizations managed by that repository. Please exercise caution and ensure proper access control measures.
+## Importance of access control
-## Dive Deeper
+Write access to this repository can affect administrative settings across the organization. Grant it with the same care as other organization administration access.
-- Learn more about [what GitHub Management is and how it works](docs/ABOUT.md).
-- Get started with [setting up GitHub Management](docs/SETUP.md).
-- Uncover [how to effectively utilize GitHub Management](docs/HOWTOS.md).
+## Why is it called github-mgmt?
-## Active Users
-
-A broad range of diverse organizations are already leveraging our GitHub Management solution via Pull Request Workflow. You can find a comprehensive list of these organizations on our [GitHub Management Router repository](https://github.com/pl-strflt/github-mgmt-router). This list showcases the versatility and effectiveness of our GitHub Management system. Our solution can be tailored to meet your unique requirements, driving efficiency and streamlined GitHub organization management.
+[ipdxco/github-as-code](https://github.com/ipdxco/github-as-code) grew out of [filecoin-project/github-mgmt](https://github.com/filecoin-project/github-mgmt). github-mgmt was the original name, and it's the one that has stuck in the Filecoin community.
diff --git a/docs/HOWTOS.md b/docs/HOWTOS.md
index 01cd2ee..8ca866a 100644
--- a/docs/HOWTOS.md
+++ b/docs/HOWTOS.md
@@ -91,14 +91,11 @@ I push my changes to a new branch and create a PR. An admin reviews the PR and m
### ...synchronize GitHub Management with GitHub?
-Run the `Sync` workflow from `master` using **Actions → Sync → Run workflow**.
-
-`Sync` imports the current GitHub configuration into the FilOzone Terraform state in S3 and force-pushes the updated YAML to `master`.
+`Sync` imports the current GitHub configuration into the FilOzone Terraform state in S3 and force-pushes the updated YAML to `master`. Follow [Sync from GitHub](INFRA_ADMIN.md#sync-from-github) in the admin guide to run it.
### ...upgrade GitHub Management?
-- Run `Upgrade` GitHub Action workflow
-- Merge the pull request that the workflow created once the `Comment` check passes and you verify the plan posted as a comment - *the plan should not contain any changes*
+Use the [reviewed PR process for upstream upgrades](INFRA_ADMIN.md#upgrade-from-upstream).
### ...remove resources from GitHub Management state?
diff --git a/docs/INFRA_ADMIN.md b/docs/INFRA_ADMIN.md
new file mode 100644
index 0000000..8e4500a
--- /dev/null
+++ b/docs/INFRA_ADMIN.md
@@ -0,0 +1,121 @@
+# FilOzone github-mgmt infrastructure admin guide
+
+This guide is for FilOz maintainers operating github-mgmt. See the [README](../README.md) to request access, [ABOUT](ABOUT.md) for the resource model, and [SETUP](SETUP.md) for installation details.
+
+## Terraform state
+
+[Plan] previews proposed changes. [Apply] runs after a merge to `master`, regenerates the plan, and applies it when it matches the reviewed plan. [Sync] reads FilOzone's GitHub settings into the Terraform state and updates the YAML.
+
+| Backend | Value |
+| --- | --- |
+| FilOz AWS account and region | `941641221830`, `us-east-1` |
+| Versioned bucket and Terraform workspace | `filoz-github-mgmt-filozone`, `FilOzone` |
+| Organization state object | `org/FilOzone/terraform.tfstate` |
+| Organization state lock object | `org/FilOzone/terraform.tfstate.tflock` |
+| Bootstrap state object | `bootstrap/terraform.tfstate` |
+| AWS OIDC roles | `filoz-github-mgmt-filozone-ro` and `filoz-github-mgmt-filozone-rw` |
+
+The [Terraform state backend](../terraform/terraform_override.tf) stores the state used by the workflows. The [Terraform bootstrap](../terraform/bootstrap/aws.tf) manages the bucket and IAM roles using its own state and lock in the same bucket. The workflow roles' policies only cover the FilOzone and default-workspace state objects and their lock files, not `bootstrap/terraform.tfstate`, so the workflows can't read or change the bootstrap state.
+
+To change the bucket or roles, use your MFA-backed AWS session to run `terraform -chdir=terraform/bootstrap init` and `terraform -chdir=terraform/bootstrap plan`. If the plan proposes creating the existing bucket or IAM roles, check the bootstrap backend and state before applying. Keep both state files private. [Terraform state security](https://developer.hashicorp.com/terraform/language/manage-sensitive-data#state-security-best-practices)
+
+## GitHub Actions environments
+
+The [read-only App](https://github.com/organizations/FilOzone/settings/apps/filozone-mgmt-read-only) and [read-write App](https://github.com/organizations/FilOzone/settings/apps/filozone-mgmt-read-write) authenticate calls to GitHub. Their IDs, installation IDs, and PEM files are stored as [environment secrets](https://github.com/FilOzone/github-mgmt/settings/environments). Jobs that use S3 request temporary AWS credentials through [OIDC](https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-aws).
+
+| Environment | Allowed branches | GitHub App secrets | AWS access | Jobs |
+| --- | --- | --- | --- | --- |
+| [`read`][read] | Any | `RO_GITHUB_APP_*` | Read-only role for Plan, Comment, and Fix | [Plan] (`plan`, `comment`), [Fix] (`fix`), [Apply] (`prepare`) |
+| [`write`][write] | `master` | `RW_GITHUB_APP_*` | Read-write role for Apply, Sync, and Clean | [Apply] (`apply`), [Sync] (`sync`), [Clean], [Labels] |
+| [`push`][push] | `master` | `RW_GITHUB_APP_*`, and `RO_GITHUB_APP_*` for [Clean Up] | None | [Sync] (`push`), [Fix] (`push`), [Update], [Clean Up] |
+
+Why three environments:
+
+- `read` runs on PRs, before the change is reviewed, so it allows any branch and gets only the read-only App and the read-only state role. An unmerged PR can't change FilOzone's GitHub settings or the Terraform state. On PR events, [Plan] and [Fix] run the base branch workflow and use the PR's `github/` directory as input.
+- `write` changes FilOzone's GitHub settings and the Terraform state. Only workflows running from `master` can use it, and the normal reviewed-PR flow controls what reaches `master`, so in practice only reviewed and merged code gets the read-write App and the state writer role. The read-write AWS role trusts only this environment.
+- `push` commits generated changes back to this repository (formatted YAML, Sync results, updated PR branches). It needs the read-write App to push, but not the Terraform state, so it has no AWS role. [Fix]'s `push` job runs on PR events and pushes formatted YAML to the PR branch, which is another reason to keep state access out of `push`.
+
+The App secrets exist only in these environments, so a job without `environment:` gets no App credentials.
+
+## Apply access changes
+
+- Review the full plan from [Plan] before merging. For a long plan, open **Plan → Comment → Show terraform plans**. After merge, check that the **Terraform Apply** step of [Apply] succeeded and verify the result in GitHub.
+- Wait for [Apply] and [Update] to finish before merging the next PR. [Update] attempts to refresh eligible PR branches. Refresh any skipped or conflicting branch and review its new plan. [Apply] stops if the merged commit's plan differs from the reviewed plan.
+- github-mgmt can't remove organization members or delete repositories: `prevent_destroy` blocks both ([Terraform resources](../terraform/resources.tf)). Removing a member or deleting a repository can't be cleanly undone, so a deleted YAML line or a typo must not be able to do it. An org owner does it in GitHub instead; see [Remove a member from FilOzone](#remove-a-member-from-filozone). For a repository, prefer archiving; if it must be deleted, an org owner deletes it in GitHub and a maintainer runs [Sync]. Normal PRs can remove team memberships and direct collaborator grants.
+- GitHub prevents changes to collaborators and teams on archived repositories. The YAML for an archived repository is reduced to `archived: true`, and Terraform uses the existing state for its grants. To change a grant, unarchive the repository in one PR and check that [Apply] succeeded and the grants are back in the YAML, then change the grant in a separate PR. Re-archive after the access change has applied if the repository should stay archived. [GitHub archive behavior](https://docs.github.com/en/repositories/archiving-a-github-repository/archiving-repositories) · [Terraform locals](../terraform/locals.tf) · [Fix logic](../scripts/src/actions/shared/toggle-archived-repos.ts)
+- Some settings can't be changed through github-mgmt. [Terraform overrides](../terraform/resources_override.tf) tell Terraform to ignore changes to them on existing teams, repositories and branch protections, so editing them in the YAML has no effect, and [Sync] leaves them out of the YAML. Change them in GitHub instead. Examples: a team's description, parent team and privacy; a repository's description, topics, homepage, default branch, the four allow-merge toggles, and issues, projects, wiki and Pages settings. The override file is the full list.
+
+### Remove a member from FilOzone
+
+An org owner could simply remove the person in GitHub and run [Sync]. We use a PR first anyway: it records who asked for the removal and why, gives a place to discuss it, and removes the person's team memberships and direct repository grants through the normal reviewed flow.
+
+1. Open a PR that removes the person's team memberships and direct grants on repositories, and explains who requested the removal and why. Keep their entry in the `members` section and add a comment saying an org owner will remove them in GitHub.
+2. After the PR merges, verify that [Apply] succeeded and that GitHub shows the team memberships and direct grants were removed.
+3. A FilOzone org owner selects the member on the [People](https://github.com/orgs/FilOzone/people) page, chooses **Remove from organization**, and confirms the removal. [GitHub member removal](https://docs.github.com/en/organizations/managing-membership-in-your-organization/removing-a-member-from-your-organization)
+4. A maintainer runs [Sync](#sync-from-github) from `master`. Check that the **Sync (FilOzone)** and **Push** jobs succeed and that the member no longer appears in `github/FilOzone.yml`.
+
+## Sync from GitHub
+
+[Sync] is scheduled for Sundays at 00:00 UTC. For a manual run, open [Sync in Actions](https://github.com/FilOzone/github-mgmt/actions/workflows/sync.yml) and select **Run workflow** on `master`. Leave `workspaces` blank or enter `FilOzone`. Keep `lock=true` and `refresh=false`. This setting skips the optional pre-import refresh; [Sync] still refreshes the Terraform state after importing.
+
+Wait for running [Apply], [Sync] and [Clean] runs to finish, and don't merge PRs while [Sync] runs. Its **Push** job favors the sync branch when resolving merge conflicts and uses `git push --force` when publishing the result. Verify that the **Sync (FilOzone)** and **Push** jobs succeeded and review what reached `master`. The [`.sync` file](../.sync) records the run ID.
+
+## Recover or rebuild the organization state
+
+Use these steps for `org/FilOzone/terraform.tfstate`. To recover `bootstrap/terraform.tfstate`, restore a known-good version of that object and verify it with a bootstrap plan.
+
+1. Pause unrelated merges. Disable [Apply in Actions](https://github.com/FilOzone/github-mgmt/actions/workflows/apply.yml) (**⋯ → Disable workflow**) and let running [Apply], [Sync] and [Clean] runs finish.
+2. If a known-good version is available, copy it to the same key as the new current version. If the state is unreadable and no usable version remains, confirm versioning is enabled and delete the key without a version ID to add a delete marker. This preserves earlier versions and lets [Sync] start empty. If switching backends, merge the backend PR before running [Sync]. [Restore an S3 object version](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RestoringPreviousVersions.html) · [S3 delete markers](https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html)
+3. Run [Sync](#sync-from-github) from `master` and wait for the **Sync (FilOzone)** and **Push** jobs to succeed. The initial FilOzone import took about 20 minutes ([run](https://github.com/FilOzone/github-mgmt/actions/runs/45818396464)).
+4. Re-enable [Apply], then check the new state with a small PR and its [Apply] run.
+
+The first plan after a rebuild can show default merge and sign-off values on archived repositories. Check that the repositories remain archived and that the plan contains only those fields; the pinned GitHub provider skips updates to repositories that stay archived ([provider update logic](https://github.com/integrations/terraform-provider-github/blob/v6.6.0/github/resource_github_repository.go#L740-L746)). Review any other changes before merging.
+
+For a failed run that left a lock, see [Recover from a stuck state lock](#recover-from-a-stuck-state-lock).
+
+## Recover from a failed Apply
+
+Don't merge other PRs until this is resolved. Inspect the failed [Apply] run for the merge commit.
+
+- **Credential failure.** Check the AWS role ARN, OIDC trust, and job environment. For a GitHub sign-in failure, check the App ID, installation ID, and PEM secret in the job's environment.
+- **Reviewed plan missing.** Check the **Find sha for plan** and **Download reviewed terraform plan** steps. Retry the failed run after fixing the cause and confirming the reviewed plan is still current. A fresh manual dispatch looks for a [Plan] artifact for the selected commit.
+- **Plan mismatch, partial Apply, or drift.** [Plan] and [Apply] generate plans with `-refresh=false`, so they compare the YAML with the saved Terraform state. Check the affected settings in GitHub as well. If GitHub has the intended settings, run [Sync] and review the result. If the intended settings are in the YAML, save that version first, run [Sync] to reconcile the Terraform state and YAML with GitHub, then restore the intended settings through a follow-up PR with a fresh plan.
+- Resume merging after [Apply] succeeds, the result is verified in GitHub, and [Update] finishes.
+
+## Recover from a stuck state lock
+
+An interrupted run or an expired AWS session can leave a lock behind. Get the lock ID and path from the error. Check for active or queued [Apply], [Sync] and [Clean] runs, and confirm with the other maintainers that the previous lock holder has stopped and no other writer will start during recovery.
+
+From a fresh checkout of `master`, use an MFA-backed AWS session that can read the backend and delete its lock. Check the AWS account with `aws sts get-caller-identity --query Account --output text` and continue for `941641221830`.
+
+```sh
+terraform -chdir=terraform init -input=false
+terraform -chdir=terraform workspace select FilOzone
+terraform -chdir=terraform workspace show
+```
+
+Verify the workspace and match the lock path from the error to the state lock object above. Run `terraform -chdir=terraform force-unlock LOCK_ID` with the lock ID from the failure. Keep locking enabled for the retry. If [Sync] was interrupted while importing, rerun it against the same backend and workspace to reuse the saved progress. Check the Terraform state version and the next Actions run to verify recovery. [Terraform lock recovery](https://developer.hashicorp.com/terraform/language/state/locking#force-unlock)
+
+## Rotate GitHub App credentials
+
+1. An App manager opens the App's settings and generates a new private key. Update `RO_GITHUB_APP_PEM_FILE` in both [`read`][read] and [`push`][push], or `RW_GITHUB_APP_PEM_FILE` in both [`write`][write] and [`push`][push], depending on the App being rotated.
+2. Verify the new credentials on the affected workflows: [Plan] and [Fix] for `read`, an [Apply] or [Sync] for `write`, and a token-generating job for `push`. Verify the read-only key in `push` on an approved [Clean Up] run; that workflow can update the cleanup branch.
+3. In the App's **Credentials → Key pairs** settings, match the old entry by fingerprint and delete it after verifying the replacement. Confirm that the old fingerprint is absent. [GitHub App key management](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps#deleting-private-keys)
+
+## Upgrade from upstream
+
+1. Select a commit of [ipdxco/github-as-code](https://github.com/ipdxco/github-as-code) and record its SHA in the PR description.
+2. Apply selected upstream changes. Preserve FilOzone's OIDC workflows, Terraform backend and bootstrap, and local documentation. Keep upgrades on the manual PR path.
+3. Open a PR and review the workflow and Terraform diffs directly. [Plan] only takes the PR's `github/` directory as input. Review the plan and verify [Apply] after merge.
+
+[Plan]: ../.github/workflows/plan.yml
+[Apply]: ../.github/workflows/apply.yml
+[Sync]: ../.github/workflows/sync.yml
+[Fix]: ../.github/workflows/fix.yml
+[Update]: ../.github/workflows/update.yml
+[Clean]: ../.github/workflows/clean.yml
+[Clean Up]: ../.github/workflows/cleanup.yml
+[Labels]: ../.github/workflows/labels.yml
+[read]: https://github.com/FilOzone/github-mgmt/settings/environments/15158011219/edit
+[write]: https://github.com/FilOzone/github-mgmt/settings/environments/15158017921/edit
+[push]: https://github.com/FilOzone/github-mgmt/settings/environments/15157620722/edit
diff --git a/docs/SETUP.md b/docs/SETUP.md
index b6151f1..76d9e28 100644
--- a/docs/SETUP.md
+++ b/docs/SETUP.md
@@ -14,7 +14,8 @@
FilOzone uses a versioned S3 bucket for Terraform state and [S3 lock files](https://developer.hashicorp.com/terraform/language/backend/s3#enabling-s3-state-locking). GitHub Actions uses [OIDC](https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-aws) to assume one of two IAM roles.
- [ ] Use the [bootstrap Terraform configuration](../terraform/bootstrap/aws.tf) to manage the bucket and roles in the FilOz AWS account. The account already has the GitHub Actions OIDC provider.
-- [ ] Keep the bootstrap Terraform state in secure storage and use that state for subsequent changes to the bucket and roles.
+- [ ] The bootstrap stores its state at `bootstrap/terraform.tfstate`. To create a new bucket, temporarily comment out the `backend "s3"` block in [aws.tf](../terraform/bootstrap/aws.tf), run `terraform init` and `terraform apply` in `terraform/bootstrap` with local state, then restore the block.
+- [ ] To migrate an existing local state, confirm the S3 state key is empty. With an MFA-backed AWS session, keep a private backup, place `terraform.tfstate` in `terraform/bootstrap/`, and run `terraform -chdir=terraform/bootstrap init -migrate-state`. From a fresh checkout of the same revision, run `init` and `plan` in `terraform/bootstrap`. Keep the backup until the plan reports **No changes**. [Terraform backend migration](https://developer.hashicorp.com/terraform/cli/commands/init#backend-initialization)
- [ ] If you change the backend, keep [terraform/terraform_override.tf](../terraform/terraform_override.tf), the IAM policies, and the workflow role ARNs in sync.
- [ ] Restrict the GitHub Actions `write` environment to `master`. The read-only role trusts the `read` environment, and the read-write role trusts the `write` environment.
@@ -47,8 +48,8 @@ FilOzone uses a versioned S3 bucket for Terraform state and [S3 lock files](http
## GitHub Actions Environments and Secrets
-- [ ] Create GitHub Actions environments named `read`, `write`, and `push`, and configure protection rules such as required reviewers. Workflows that read organization state reference `read`; workflows that write organization state reference `write`; workflows that push generated changes to the GitHub Management repository reference `push`.
-- [ ] [Create encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-an-organization) for the GitHub organization and allow the repository to access them (\*replace `$GITHUB_ORGANIZATION_NAME` with the GitHub organization name) - *these secrets are read by the GitHub Action workflows*
+- [ ] Create GitHub Actions environments named `read`, `write`, and `push`. Restrict `write` and `push` to the `master` branch. See the [environment and job mapping](INFRA_ADMIN.md#github-actions-environments).
+- [ ] Create the GitHub App credentials as environment secrets. Add the `RO_GITHUB_APP_*` secrets to `read` and `push`, and the `RW_GITHUB_APP_*` secrets to `write` and `push`.
- [ ] Go to `https://github.com/organizations/$GITHUB_ORGANIZATION_NAME/settings/apps/$GITHUB_APP_NAME` and copy the `App ID`
- [ ] `RO_GITHUB_APP_ID`
- [ ] `RW_GITHUB_APP_ID`
@@ -63,7 +64,7 @@ FilOzone uses a versioned S3 bucket for Terraform state and [S3 lock files](http
*NOTE*: Advanced users might want to modify the resource types and their arguments/attributes managed by GitHub Management at this stage.
-*NOTE*: You can manage more than one organization from a single GitHub Management repository. To do so create more YAMLs under `github` directory. Remember to set up secrets for all your organizations.
+This deployment manages the `FilOzone` Terraform workspace. The bootstrap IAM policies scope state access to that workspace and the backend's default key.
- [ ] [Clone the repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
- [ ] Replace placeholder strings in the clone - *the repository needs to be customised for the specific organization it is supposed to manage*
@@ -74,7 +75,7 @@ FilOzone uses a versioned S3 bucket for Terraform state and [S3 lock files](http
## GitHub Management Sync Flow
-- [ ] Follow [How to synchronize GitHub Management with GitHub?](HOWTOS.md#synchronize-github-management-with-github) to commit the terraform lock and initialize terraform state
+- [ ] Follow [How to synchronize GitHub Management with GitHub?](HOWTOS.md#synchronize-github-management-with-github) to initialize the FilOzone workspace state
## GitHub Management Repository Protections
@@ -89,7 +90,7 @@ FilOzone uses a versioned S3 bucket for Terraform state and [S3 lock files](http
- [ ] If the repository is public, [require approval for all outside collaborators](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-required-approval-for-workflows-from-public-forks)
- [ ] If the repository is private, [disable sending write tokens or secrets to workflows from fork pull requests](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#enabling-workflows-for-private-repository-forks)
- [ ] Pull remote changes to the default branch
-- [ ] Enable required PRs, peer reviews, status checks and branch up-to-date check on the repository by making sure [github/$ORGANIZATION_NAME.yml](github/$ORGANIZATION_NAME.yml) contains the following entry:
+- [ ] Enable required PRs, peer reviews, status checks and branch up-to-date check on the repository by making sure `github/$ORGANIZATION_NAME.yml` contains the following entry:
```yaml
repositories:
$GITHUB_MGMT_REPOSITORY_NAME:
diff --git a/terraform/bootstrap/aws.tf b/terraform/bootstrap/aws.tf
index ee690b5..f8e4833 100644
--- a/terraform/bootstrap/aws.tf
+++ b/terraform/bootstrap/aws.tf
@@ -7,6 +7,14 @@ terraform {
}
required_version = "~> 1.12.0"
+
+ # The bucket below must exist before this backend can be used.
+ backend "s3" {
+ region = "us-east-1"
+ bucket = "filoz-github-mgmt-filozone"
+ key = "bootstrap/terraform.tfstate"
+ use_lockfile = true
+ }
}
provider "aws" {