File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,15 +4,12 @@ Terraform infrastructure as code
44## Instructions
551 . Setup the basic infrastructure for either staging / production environment
66```
7- cd terraform
8- cd environments/staging
9- terraform init
10- terraform apply
7+ ./init.sh <environment>
118```
9+ The supported environment values are currently ` staging ` and ` production `
1210
13112 . Setup the Kubernetes utilities
1412```
15- cd kubernetes/terraform
16- cd environments/staging
13+ cd kubernetes/terraform/environments/staging
1714terraform apply
1815```
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ ENV=${1:- staging}
3+
4+ # Setup the remote state storage
5+ pushd terraform/environments/bootstrap;
6+ terraform init;
7+ terraform apply;
8+ popd ;
9+
10+ # Setup the secrets
11+ pushd terraform/environments/bootstrap;
12+ terraform init;
13+ terraform apply;
14+ popd ;
15+
16+ # Setup the chosen environment
17+ pushd terraform/environments/$ENV ;
18+ terraform init;
19+ terraform apply;
20+ popd ;
21+
22+ # Setup the Kubernetes utilities
23+ pushd kubernetes/terraform/environments/$ENV ;
24+ terraform init;
25+ terraform apply;
26+ popd ;
You can’t perform that action at this time.
0 commit comments