diff --git a/.gitignore b/.gitignore index 0696b3e..28fc68e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.terraform \ No newline at end of file +.terraform +tools/prowler/output diff --git a/README.md b/README.md index 0335a55..76849ca 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,36 @@ ## Terraform for AWS plaground +The goal of this AWS setup is to have an automated AWS Organization set up that: + +1. Is fully compliant with SOC2 +1. Is fully compliant with AWS, CIS, and NIST security standards. +1. Has minimal AWS cost overhead +1. Facilitates easily testing out things in AWS test accounts + +### Running locally + This requires env vars with user credentials that can assume to adminstrator. +If `aws sts get-caller-identity` works, you are good, otherwise: -``` +```bash export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= ``` -Currently only works in tenants/management with `terraform apply`. +Currently only works in `tenants/management` with `terraform apply`. + +Run `prowler` to populate Security Hub with any breaking things it fines by: +`cd tools/prowler/ && ./install-prowler.sh && ./run-prowler.sh` ### TODO -- [] linters and formatters etc -- [] saml2aws for logging in, what to use for IdP? -- [] import everything in root account, test1 account, test2 account -- [] get some securityhub things passing -- [] setup github actions for terraform plan, terraform apply -- [] terraform plugin caching -- [] Setup AWS Config -- [] lots more +- [ ] linters and formatters etc +- [ ] saml2aws for logging in, what to use for IdP? +- [ ] get test1 and test2 accounts working with `terraform apply` +- [ ] import everything in root account, test1 account, test2 account +- [ ] get prowler checks to 100% green +- [ ] setup github actions for terraform plan, terraform apply, prowler +- [ ] terraform plugin caching +- [ ] Setup AWS Config +- [ ] lots more diff --git a/modules/compliant-account/aws-support.tf b/modules/compliant-account/aws-support.tf new file mode 100644 index 0000000..92ac25c --- /dev/null +++ b/modules/compliant-account/aws-support.tf @@ -0,0 +1,24 @@ +resource "aws_iam_role" "aws_support_access" { + name = "aws-support-access" + assume_role_policy = <