Skip to content

Add container platform github access runbooks to cp3 section#8279

Merged
Jagbai merged 1 commit into
mainfrom
ja-update-runbooks-with-cp-github-access
May 29, 2026
Merged

Add container platform github access runbooks to cp3 section#8279
Jagbai merged 1 commit into
mainfrom
ja-update-runbooks-with-cp-github-access

Conversation

@Jagbai

@Jagbai Jagbai commented May 27, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Jagbai Jagbai force-pushed the ja-update-runbooks-with-cp-github-access branch 2 times, most recently from 976f781 to 12eadc0 Compare May 29, 2026 10:17
- grant team access
- import existing repositories into Terraform state safely

####Before you start

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a space after ####


####Before you start

1. Ensure local setup and authentication per container platform github access README.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread source/cp30/importing-existing-repos.html.md.erb
@@ -0,0 +1,245 @@
---
title: GitHub Access Manager Adding or Importing Repositories

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is best left as "Importing Existing Repositories"

---
title: GitHub Access Manager Adding or Importing Repositories
weight: 35
last_reviewed_on: 2026-05-27

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread source/cp30/importing-existing-repos.html.md.erb
Comment thread source/cp30/importing-existing-repos.html.md.erb Outdated
- [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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


#### Team data sources

Teams are defined as `data "github_team"` blocks in `data.tf`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- `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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread source/cp30/importing-existing-repos.html.md.erb
@Jagbai Jagbai force-pushed the ja-update-runbooks-with-cp-github-access branch 3 times, most recently from c91f28e to a9c2669 Compare May 29, 2026 15:15
@Jagbai Jagbai merged commit 8571961 into main May 29, 2026
3 checks passed
@Jagbai Jagbai deleted the ja-update-runbooks-with-cp-github-access branch May 29, 2026 15:25
@github-project-automation github-project-automation Bot moved this to 🥇 Done in Cloud Platform May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🥇 Done

Development

Successfully merging this pull request may close these issues.

2 participants