Starter Pack is deployed to AWS on S3. CloudFront is used as a CDN. Route 53 is used for DNS.
--
All commands below must be run in the /infrastructure directory.
To deploy to AWS, you must:
- Install Terraform and make sure it is in your PATH.
- Set your AWS credentials using one of the following options:
- Set your credentials as the environment variables
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
. - Run
aws configure
and fill in the details it asks for. - Run on an EC2 instance with an IAM Role.
- Set your credentials as the environment variables
- Configure Terraform to use Remote State using the following command:
terraform remote config -backend=s3 -backend-config="bucket=YOUR_BUCKET_NAME" -backend-config="key=starter-pack.tfstate" -backend-config="region=YOUR_REGION" -backend-config="encrypt=true"
terraform plan -var-file starter-pack.tfvars
terraform apply -var-file starter-pack-2.tfvars
- Make necessary infrastructure code changes.
- Configure Terraform to use Remote State using the following command:
terraform remote config -backend=s3 -backend-config="bucket=YOUR_BUCKET_NAME" -backend-config="key=starter-pack.tfstate" -backend-config="region=YOUR_REGION" -backend-config="encrypt=true"
terraform plan -var-file starter-pack.tfvars
terraform apply -var-file starter-pack-2.tfvars
- Configure Terraform to use Remote State using the following command:
terraform remote config -backend=s3 -backend-config="bucket=YOUR_BUCKET_NAME" -backend-config="key=starter-pack.tfstate" -backend-config="region=YOUR_REGION" -backend-config="encrypt=true"
terraform plan -var-file starter-pack.tfvars