github-repo-building-block
Module that creates a github.com repository. This repository can be based on a template repo. It can be used as a Building Block inside of meshStack.
https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository
How to use this Building Block in meshStack
- Go to your meshStack admin area and click on "Building Blocks" from the left pane
- Click on "Create Building Block"
- Fill out the general information and click next
- Select any of the platforms as your supported platform to attach this building block to.
- Select "Terraform" in Implementation Type and put in the Terraform version
- Copy the repository HTTPS address to the "Git Repository URL" field (if its a private repo, add your SSH key) click next
- For the inputs do the following
- Backend configuration:
- Select "File" as input type and upload the backend.tf file.
- Add related environment variables based on your backend configuration (e.g. client_id and client_secret for azure, SA_ID and SA_EMAIL for GCS)
- add other Variables:
- github_token and github_owner variable is the required credentials for the github provider
- add rest of the variables in variables.tf as you desired
- Backend configuration:
- On the next page, add the outputs from outputs.tf file and click on Create Building Block
- Now users can add this building block to their tenants
Env vars needed for provider
https://registry.terraform.io/providers/integrations/github/latest/docs
Requirements
Name | Version |
---|---|
github | 5.34.0 |
Modules
No modules.
Resources
Name | Type |
---|---|
github_repository.repository | resource |
Inputs
Name | Description | Type | Default | Required |
---|---|---|---|---|
description | n/a | string | "created by github-repo-building-block" | no |
github_owner | n/a | string | n/a | yes |
github_token | n/a | string | n/a | yes |
repo_name | n/a | string | n/a | yes |
visibility | n/a | string | "private" | no |
Outputs
Name | Description |
---|---|
repo_full_name | n/a |
repo_git_clone_url | n/a |
repo_html_url | n/a |
repo_name | n/a |
Source code & Installation
The source code of this kit module can be found here
Run the following command to install the kit module:
collie kit import github/repository
1