File tree Expand file tree Collapse file tree 6 files changed +64
-42
lines changed Expand file tree Collapse file tree 6 files changed +64
-42
lines changed Original file line number Diff line number Diff line change
1
+ # 01 - Evolution of Cloud + Infrastructure as Code
2
+
1
3
This module doesn't have any corresponding code.
Original file line number Diff line number Diff line change
1
+ ## 02 - Overview + Setup
2
+
1
3
## Install Terraform
2
- 1 ) install terraform
4
+
5
+ Official installation instructions from HashiCorp: https://learn.hashicorp.com/tutorials/terraform/install-cli
3
6
4
7
## AWS Account Setup
5
- 2 ) create non-root AWS user
6
- 3 ) Add AmazonEC2FullAccess
7
- 4 ) Save Access key + secret key (or use AWS CLI ` aws configure ` -- https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html )
8
8
9
+ AWS Terraform provider documentation: https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication
10
+
11
+ 1 ) create non-root AWS user
12
+ 2 ) Add the necessary IAM roles (e.g. AmazonEC2FullAccess)
13
+ 3 ) Save Access key + secret key (or use AWS CLI ` aws configure ` -- https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html )
14
+
15
+ ## Hello World
16
+
17
+ ` ./main.tf ` contains minimal configuration to provision an EC2 instance.
18
+
19
+ 1 ) ` aws configure `
20
+ 2 ) ` terraform init `
21
+ 3 ) ` terraform plan `
22
+ 4 ) ` terraform apply `
Original file line number Diff line number Diff line change 1
- 1 ) Create account credentials
1
+ ## 03 - Basics
2
2
3
+ ## Remote Backends
3
4
5
+ Remote backends enable storage of TF state in a remote, location to enable secure collaboration.
4
6
7
+ ### Terraform Cloud
8
+
9
+ https://www.terraform.io/cloud
10
+
11
+ ` ./terraform-cloud-backend/main.tf `
12
+
13
+ ### AWS S3 + Dynamo DB
14
+
15
+ Steps to initialize backend in AWS and manage it with Terraform:
16
+
17
+ 1 ) Use config from ` ./aws-backend/ ` (init, plan, apply) to provision s3 bucket and dynamoDB table with local state
18
+ 2 ) Uncomment the remote backend configuration
19
+ 3 ) Reinitialize with ` terraform init ` :
20
+
21
+ ```
22
+ Do you want to copy existing state to the new backend?
23
+ Pre-existing state was found while migrating the previous "local" backend to the
24
+ newly configured "s3" backend. No existing state was found in the newly
25
+ configured "s3" backend. Do you want to copy this state to the new "s3"
26
+ backend? Enter "yes" to copy and "no" to start with an empty state.
27
+
28
+ Enter a value: yes
29
+ ```
30
+
31
+ Now the S3 bucket and dynamoDB table are mam and are able to be used as the state backend!
32
+
33
+ ## Web-App
34
+
35
+ Generic web application architecture including:
36
+ - EC2 instances
37
+ - S3 bucket
38
+ - RDS instance
39
+ - Load balancer
40
+ - Route 53 DNS config
41
+
42
+ This example will be refined and improved in later modules.
43
+
44
+ ## Architecture
45
+ ![ ] ( ./web-app/architecture.png )
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ High level overview of the evolution of cloud computing and infrastructure as co
10
10
11
11
This module does not have any corresponding code.
12
12
13
- ## 02 - Overview
13
+ ## 02 - Overview + Setup
14
14
15
15
Terraform overview and setup instructions.
16
16
17
- Includes super basic ` hello world ` terraform config to provision a single AWS EC2 instance.
17
+ Includes basic ` hello world ` terraform config to provision a single AWS EC2 instance.
18
18
19
19
## 03 - Basics
20
20
You can’t perform that action at this time.
0 commit comments