@@ -4,7 +4,7 @@ Scope-lex-handler is a Lambda function built, tested and deployed to AWS by Code
4
4
5
5
---
6
6
7
- ### Deployment Prerequisites
7
+ ## Deployment Prerequisites
8
8
9
9
** All commands below must be run in the /infrastructure directory.**
10
10
@@ -17,18 +17,20 @@ To deploy to AWS, you must:
17
17
1 . Run on an EC2 instance with an IAM Role.
18
18
1 . Run via CodeBuild or ECS Task with an IAM Role (see [ buildspec-test.yml] ( ../buildspec-test.yml ) for workaround)
19
19
20
- #### Deploying infrastructure
20
+ ### Deploying infrastructure
21
21
22
22
1 . Update and export all environment variables specified in the appropriate buildspec declaration (check all phases) and bash scripts
23
23
1 . Initialise Terraform:
24
- ```
24
+
25
+ ``` terraform
25
26
terraform init \
26
27
-backend-config 'bucket=YOUR_S3_BUCKET' \
27
28
-backend-config 'key=YOUR_S3_KEY' \
28
29
-backend-config 'region=YOUR_REGION' \
29
30
-get=true \
30
31
-upgrade=true
31
32
```
33
+
32
34
1 . ` terraform plan -out main.tfplan `
33
35
1 . ` terraform apply main.tfplan `
34
36
@@ -37,27 +39,31 @@ terraform init \
37
39
1 . Update and export all environment variables specified in the appropriate buildspec declaration (check all phases) and bash scripts
38
40
1 . Make necessary infrastructure code changes.
39
41
1 . Initialise Terraform:
40
- ```
42
+
43
+ ``` terraform
41
44
terraform init \
42
45
-backend-config 'bucket=YOUR_S3_BUCKET' \
43
46
-backend-config 'key=YOUR_S3_KEY' \
44
47
-backend-config 'region=YOUR_REGION' \
45
48
-get=true \
46
49
-upgrade=true
47
50
```
51
+
48
52
1 . ` terraform plan -out main.tfplan `
49
53
1 . ` terraform apply main.tfplan `
50
54
51
55
#### Destroying infrastructure (use with care)
52
56
53
57
1 . Update and export all environment variables specified in the appropriate buildspec declaration (check all phases) and bash scripts
54
58
1 . Initialise Terraform:
55
- ```
59
+
60
+ ``` terraform
56
61
terraform init \
57
62
-backend-config 'bucket=YOUR_S3_BUCKET' \
58
63
-backend-config 'key=YOUR_S3_KEY' \
59
64
-backend-config 'region=YOUR_REGION' \
60
65
-get=true \
61
66
-upgrade=true
62
67
```
63
- 1 . ` terraform destroy `
68
+
69
+ 1 . ` terraform destroy `
0 commit comments