Skip to content

Bootstrap your AWS Organization with the InfraWeave platform using Terraform πŸš€. This repo offers a streamlined, ready-to-go setup for managing your cloud infrastructure.

License

Notifications You must be signed in to change notification settings

infraweave-io/aws-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Getting Started πŸš€

Welcome to InfraWeave! This guide will walk you through bootstrapping your AWS accounts to support the InfraWeave platform.

Set Up AWS Config πŸ”§

Before you begin, ensure you have configured profiles for all your AWS accounts. Below is an example configuration for your ~/.aws/config file:

# Filename: ~/.aws/config

# ...

[profile central]
sso_account_id = 000000000000
region = us-east-1
sso_session = aws-sso-session
sso_role_name = AdministratorAccess

[profile project1-dev]
sso_account_id = 111111111111
region = us-east-1
sso_session = aws-sso-session
sso_role_name = AdministratorAccess

[sso-session aws-sso-session]
sso_start_url = https://d-1234567890.awsapps.com/start
sso_region = us-east-1
sso_registration_scopes = sso:account:access

Clone the Repository πŸ“₯

Clone this, designed to simplify your setup process. The repository structure is as follows:

.
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ central.tf
β”œβ”€β”€ locals.tf
β”œβ”€β”€ project1-dev.tf
└── update_pull_through_cache.sh

Configuration βš™οΈ

Before bootstrapping the control plane, configure it according to your environment’s requirements.

Configure Settings

Within locals.tf, review and update the following configuration:

  • environment

environment: By default, this is set to "prod". If you need to support multiple control planes, adjust this parameter accordingly. You can either duplicate the folder for each environment or modify the code to manage multiple environments within the same directory.

Configure the Central Account

Edit the central.tf file to:

  1. Set up one central module per supported region.
  2. Configure a corresponding provider for each region, naming them appropriately.

Configure each Workload Account

For each project (e.g., project1-dev), a dedicated .tf file is provided. Within these files:

  1. Set up one workload module per supported region.
  2. Configure the corresponding provider for each region, with appropriate naming.

Bootstrapping the Platform πŸš€

  1. SSO Login: Ensure you have an active SSO session:
aws sso login --sso-session aws-sso-session
  1. Initialize the Pull-Through Cache: Before bootstrapping the infrastructure for the first time, set up and populate the pull-through cache. Modify and run the provided script:
./update_pull_through_cache.sh
  1. Run Terraform: Execute the following commands to bootstrap your entire platform across all desired AWS accounts:
terraform init
terraform apply

Note: Repeat these steps for upgrades as well.

About

Bootstrap your AWS Organization with the InfraWeave platform using Terraform πŸš€. This repo offers a streamlined, ready-to-go setup for managing your cloud infrastructure.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •