Cookiecutter template for a Terraform live repository managing a GitHub organization.
- Create a Terraform live repository.
- Configure Continuous Integration and Deployment (CI/CD) using GitHub Actions.
- Create a documentation template with Sphinx and ReadTheDocs configuration.
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install "cookiecutter~=2.1"
Generate a GitHub Control repository
cookiecutter https://github.com/infrahouse/cookiecutter-github-control.git
Publish the generated repository to GitHub. my-org
is an organization name from the previous step.
cd my-org-github-control
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/my-org/my-org-github-control.git
git push -u origin main
Enter AWS and GitHub secrets in https://github.com/<my-gh-user>/<my-org>-github-control/settings/secrets/actions
:
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_DEFAULT_REGION
GH_TOKEN
my-gh-user
is a GitHub user that hosts the repository. I recommend using a separate dedicated user to manage
your GitHub organization.