On macOS:
- Install Homebrew
- Install GitHub CLI:
brew install gh
- Install Terraform:
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
export TF_VAR_GITHUB_TOKEN=<GITHUB_TOKEN>
terraform import "github_repository.terraform-playground" "name-of-github-repository-resource"
- Repository:
- Administration: read and write
- Issues: read and write (voor labels)
- Metadata: read only
- Pages: read and write
- Organization:
- Administration: read only
- Members: read and write
You can login in to Terraform on app.terraform.io.
When you configure Terraform Cloud, you must configure use the user interface to configure the sensitive variables defined in variables.tf
.
The following code is responsible for storing the Terraform state in the cloud:
cloud {
organization = "nl-design-system"
workspaces {
name = "github"
}
}
Removing this code should allow you to switch back to storing state in terraform.tfstate
.
- provider:
github
- data source:
github_organization
- data source:
github_user
- resource:
github_repository
- resource:
github_branch_protection
- resource:
github_repository_collaborators
- resource:
github_team
- resource:
github_team_members
- data source:
- provider:
vercel
- resource:
vercel_project
- resource:
- Add the
github_user
touser.tf
. - Add the
github_user
as one of themembers
to the existing team inteam-members.tf
.
- Create the
github_team
inteam.tf
. - Create a subteam
github_team
inteam.tf
, with people who should be able to make pull requests. Follow the team name pattern:organization-committer
ororganization-repository-committer
. Specifyparent_team_id
to extend the organization team. - Create a subteam for maintainers the
github_team
inteam.tf
. Follow the team name pattern:organization-maintainer
. Specifyparent_team_id
to extend the committer team. - Add each user as
github_user
touser.tf
. - Add
github_team_members
for the new team inteam-members.tf
, and specify all users as members. Decide which users go into thecommitter
team, and which users are in themaintainer
team. - Add the
organization-maintainer
team to the terraformgithub_repository
interraform.tf
, so the maintainers are able to make and review Pull Requests.