This project exists to manage version control systems (Github, Gitlab, etc) used to support our applications. If you need to add a repo or make a change to its config, this is the place to do it.
- repo-$org-$repo.tf
- all-lower-kebab-case
- Any *.tf file in the terraform/ folder will auto deploy when merged to main.
- Copy one of the *.example files in the root.
- Paste it into the terraform/ folder, providing a valid name ending in
.tf
. - Follow the comment instructions in your new file.
- Push to a feature branch and create a PR targeting
main
.
Example 1: zbmowrey/mail-handler
becomes repo-zbmowrey-mail-handler.tf
.
Example 2: zbmowrey/zbmowrey-com
becomes repo-zbmowrey-zbmowrey-com.tf
.
Beginning each with "repo-" will ensure that they sort together, and make finding the various terraform files a little easier.
I'm aware that the file names look redundant, but this will avoid collision in larger projects, where the possibility of having repositories with the same names is higher.
zbmowrey/mail-handler
vs repsales/mail-handler
for example. Thus, the org name becomes
important and should be retained to avoid issues as the projects grow.
- Copy the nearest neighbor in terms of desired functionality.
- Modify to your needs.
- Add secrets to terraform.auto.tfvars.
- Add secrets to version-control.tf (this will load secrets into the version-control repo).
- Add secrets to version-control/.github/workflows/deploy.yml (this will push secrets to your new repo).
- Add secrets to your new repo.
- Commit & push changes to main branch.
- Monitor github for success.
- Update Github OIDC (aws-org or cloud-admin depending on project) so the new repo can deploy.