Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blacha/github-tf
Configure github using CDKTF
https://github.com/blacha/github-tf
Last synced: about 18 hours ago
JSON representation
Configure github using CDKTF
- Host: GitHub
- URL: https://github.com/blacha/github-tf
- Owner: blacha
- Created: 2023-11-14T06:13:06.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-25T20:35:38.000Z (about 1 year ago)
- Last Synced: 2024-05-28T22:01:04.179Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# blacha/github-tf
Managing the configuration of my github repositories using Github Actions and CDKTF
## Why ?
Because I have quite a few repos, it is hard to keep them all in sync with the latest github configuration settings.
## How ?
Using CDKTF, each repository is listed as a CDK construct that is then kept in sync with a state object in S3, so if I change the repo by hand it will automatically get re-deployed back to the configuration in code.
## Usage
This repository is very specific to [github.com/blacha](https://github.com/blacha), it could be forked and then configured for your own use. CDKTF needs a S3 state file so you need to configure access for your repository to S3.
The base cdktf command also uses the `gh` CLI for auth
```bash
npm installnpx cdktf diff
npx cdktf apply
```### adding existing repositories
To add a existing repository first create the cdktf for the repo, then run a `npx cdktf synth`,
then using terraform perform a import inside the cdktf.out/stacks/:stackName folder
```bash
cd cdktf.out/stacks/github-tf/terraform import github_repository.$1 $1
```