#tool #account #terraform #aws #bootstrap #stack #cloud-formation

app aws-bootstrap

Bootstrap a minimal self-hosted Terraform setup on an AWS account, using CloudFormation stack

1 unstable release

0.1.1 Jul 1, 2022
0.1.0 Jun 30, 2022

#180 in Email

MPL-2.0 license

18KB
382 lines

AWS Bootstrap

Bootstrap a minimal self-hosted Terraform setup on an AWS account, using CloudFormation stack.

Part of the rustshop project.

Explanation

When called like this:

aws-bootstrap --email infra@example.com --base example --accounts dev,prod

with AWS_PROFILE pointing to an iamadmin Account Admin IAM identity on, will:

  • create a AWS Organinzation (if needed):
  • in each account deploy a minimal CloudFormation stack including:
    • S3 Bucket for Terraform State
    • S3 Bucket for CloudWatch Logs
    • Minimal (thus drit cheap) DynamoDB for Terraform State locking
    • some minimal policies, etc.

Requirements:

  • Uses aws CLI command under the hood

Building

You can use ./aws-bootstrap.build.sh to build the Dockerfile an export the statically linked Linux binary.

This is a normal Rust project, so can be build using cargo.

Dependencies

~12–23MB
~335K SLoC