Name | Account ID | Colour | Root Email |
---|---|---|---|
master | |||
operations | Blue | ||
production | Red | ||
staging | Orange | ||
testing | Yellow | ||
development | Green | ||
forensics | Purple |
${project}-infrastructure
|-- package.json # Script shortcuts (lint, install, deploy, test) & versioning?
|-- amis # Collection of AMIs, built by Packer
| |-- {name} # AMI files
|-- master # Setup for root level account
| |-- state # Sets up state management for terraform
| |-- account # Account setup (Groups, Monitoring)
| |-- users # IAM Users
|-- operations # Setup for operation pieces
| |-- account # Account setup (Roles, Monitoring)
| |-- cicd # Jenkins
| |-- dns # Route53
| |-- logging # ELK & CloudWatch
| |-- secrets # HashiCorp Vault
|-- environments
| |-- account # Account setup (Roles, Monitoring)
| |-- app # Public static assets
| |-- api # Public/Private API endpoints and support infrastructure (cache, events, lambda)
| |-- db # Databases
| |-- ops # Ops dashboards
| |-- vpc # VPC & Networking
|-- modules # Collection of project specific modules
$ brew install terraform
# Optional, for building AMIs
$ brew install packer
To create the workspaces, go to the respective subfolder (/environments/*/
), and run:
$ terraform init
$ terraform workspace new production
$ terraform workspace new staging
$ terraform workspace new testing
$ terraform workspace new development
Ensure you have the right workspace selected before you apply
.
$ terraform workspace select development
$ terraform workspace list
See [docs](./docs/Multi Account Setup.md) for detailed steps.
To create the AMIs, go to the respective subfolder (/amis/*/
), edit the variables.json
, and run:
$ packer build -var-file=variables.json ami.json
See docs for configuration and full documentation.
$ npm run install:npm
admin
developer
TODO complete policy for developer
TODO add in audit
role?
- master/state
- master/account
- Sub-Accounts / Organization (Manual)
- Groups for sub account access
- Roles for sub accounts (bastion)
- Users (Manual/Optional)
- CloudTrail
- Security Hub
- environment/account
- roles (admin, developer, operator, audit, etc)
- API Gateway Logs
- CloudTrail
- GuardDuty
- Inspector Agent
- Macie
- environment/vpc
- VPC
- VPC Endpoints (S3, DynamoDB)
- Bastion
- environment/db
- RDS (postgres,mysql)
- ElasticCache (redis)
- ElasticSearch
- environment/api
- [-] DynamoDB
- ALB + ECS
- ECS
- API Gateway
- Events, SQS, SNS, Lambda, S3,
- environment/app
- CloudFront
- S3
- environment/ops
- CloudWatch Dashboards
See Developer Guide (TODO add link)
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details