Add container platform github access runbooks to cp3 section#8279
Conversation
976f781 to
12eadc0
Compare
| - grant team access | ||
| - import existing repositories into Terraform state safely | ||
|
|
||
| ####Before you start |
There was a problem hiding this comment.
There should be a space after ####
|
|
||
| ####Before you start | ||
|
|
||
| 1. Ensure local setup and authentication per container platform github access README.md |
There was a problem hiding this comment.
the README.md should embed this link and point to the platform's readme https://github.com/ministryofjustice/container-platform-github-access/blob/main/README.md
| @@ -0,0 +1,245 @@ | |||
| --- | |||
| title: GitHub Access Manager Adding or Importing Repositories | |||
There was a problem hiding this comment.
This is best left as "Importing Existing Repositories"
| --- | ||
| title: GitHub Access Manager Adding or Importing Repositories | ||
| weight: 35 | ||
| last_reviewed_on: 2026-05-27 |
There was a problem hiding this comment.
Should become today's date
|
|
||
| #### Step 2: Write Config That Matches Reality | ||
|
|
||
| Add the to `github-repositories.tf` with settings that match what the API returned. |
There was a problem hiding this comment.
"Add the repository to the github-repositories.tf with settings that match what the API returned."
|
|
||
| - **`description`**: use the exact current description | ||
| - **`homepage_url`**: don't drop it if one exists | ||
| - **`is_template`**: if it's a template , set this to `true` |
There was a problem hiding this comment.
remove he extra space in front of template
| Create `imports.tf` with import blocks for resources that already exist on GitHub: | ||
|
|
||
| ```hcl | ||
| # Always import the repo itself |
There was a problem hiding this comment.
Super linter won't like repo used in place of repository or repositories. Change all references to repo to their appropriate terms i.e. repository or repositories.
| - [modules/github/repository/variables.tf](../modules/github/repository/variables.tf) | ||
|
|
||
| - Resource implementation details (rulesets, security, access bindings): | ||
| - [modules/github/repository/main.tf](../modules/github/repository/main.tf) |
There was a problem hiding this comment.
since the path used has no existence in the cloud platform repo, you need to point to where it does in the github access repo e.g. https://github.com/ministryofjustice/container-platform-github-access/blob/main/modules/github/repository/main.tf
| - `pages_configuration = { cname = "..." }` | ||
|
|
||
| - Full list of supported repository feature flags/defaults: | ||
| - [modules/github/repository/variables.tf](../modules/github/repository/variables.tf) |
There was a problem hiding this comment.
|
|
||
| #### Team data sources | ||
|
|
||
| Teams are defined as `data "github_team"` blocks in `data.tf`. |
There was a problem hiding this comment.
| - `data.github_team.cloud_platform_engineers.id` | ||
| - `data.github_team.all_org_members.id` | ||
|
|
||
| If a new team is needed, add a `data "github_team"` block in `data.tf` first. |
There was a problem hiding this comment.
c91f28e to
a9c2669
Compare
a9c2669 to
5d7935c
Compare
No description provided.