Welcome to InfraWeave! This guide will walk you through bootstrapping your AWS accounts to support the InfraWeave platform.
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 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
Before bootstrapping the control plane, configure it according to your environmentβs requirements.
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.
Edit the central.tf
file to:
- Set up one central module per supported region.
- Configure a corresponding provider for each region, naming them appropriately.
For each project (e.g., project1-dev
), a dedicated .tf
file is provided. Within these files:
- Set up one workload module per supported region.
- Configure the corresponding provider for each region, with appropriate naming.
- SSO Login: Ensure you have an active SSO session:
aws sso login --sso-session aws-sso-session
- 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
- 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.