https://github.com/sammcj/terraform-skeleton-aws
Terraform skeleton for AWS projects
https://github.com/sammcj/terraform-skeleton-aws
automation aws make terraform
Last synced: 7 months ago
JSON representation
Terraform skeleton for AWS projects
- Host: GitHub
- URL: https://github.com/sammcj/terraform-skeleton-aws
- Owner: sammcj
- License: mit
- Created: 2021-02-02T00:28:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-11T15:55:46.000Z (10 months ago)
- Last Synced: 2025-01-11T15:06:34.704Z (9 months ago)
- Topics: automation, aws, make, terraform
- Language: JavaScript
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 126
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terraform-skeleton-aws
Terraform skeleton monorepo for AWS projects- [terraform-skeleton-aws](#terraform-skeleton-aws)
- [Projects](#projects)
- [Starting a New Project](#starting-a-new-project)
- [Create a new repo from this template](#create-a-new-repo-from-this-template)
- [Initialise the Statefile](#initialise-the-statefile)
- [Makefile](#makefile)
- [Terraform Files](#terraform-files)
- [Git Hooks](#git-hooks)
- [Requirements](#requirements)
- [Installation](#installation)
- [Run Hooks Manually](#run-hooks-manually)
- [Updating Hooks](#updating-hooks)## Projects
- The projects directory stores the .tfvars file for each project.
- The skeleton repo contains two directories.
- The globals directory is run each time Terraform is run and contains variables that are constant across deployments.
- The template directory is an example of an individual project file.
- When you use Makefile to run the Terraform command, it will run with the global variables as well as the variables of the - defined project.
- A project as an individual instantiation of the Terraform state - It could be an environment (`development`/`staging`/`production`), accounts (`aws1`, `aws2`, etc), or even regions (`ap-southeast-2`, `us-east-1`, etc).### Starting a New Project
#### Create a new repo from this template
This command will output the SSH URL that you can use to clone the newly created repo.
_Note: This assumes you have a Github personal access token exported to `$GITHUB_TOKEN`._
```shell
curl -s -X POST https://api.github.com/repos/sammcj/terraform-skeleton-aws/generate \
-H "Accept: application/vnd.github.baptiste-preview+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-d @<(cat <