File tree Expand file tree Collapse file tree 9 files changed +16
-17
lines changed
04-variables-and-outputs/web-app
06-organization-and-modules/web-app
07-managing-multiple-environments Expand file tree Collapse file tree 9 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 1
1
name : " Terraform"
2
2
3
3
on :
4
- # Uncomment to enable staging deployment
5
- # push:
6
- # branches:
7
- # - main
4
+ push :
5
+ branches :
6
+ - main
8
7
release :
9
8
types : [published]
10
9
pull_request :
Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ resource "aws_lb" "load_balancer" {
182
182
}
183
183
184
184
resource "aws_route53_zone" "primary" {
185
- name = " mysuperawesomesite .com"
185
+ name = " devopsdeployed .com"
186
186
}
187
187
188
188
resource "aws_route53_record" "root" {
189
189
zone_id = aws_route53_zone. primary . zone_id
190
- name = " mysuperawesomesite .com"
190
+ name = " devopsdeployed .com"
191
191
type = " A"
192
192
193
193
alias {
Original file line number Diff line number Diff line change 1
1
bucket_name = " devops-directive-web-app-data"
2
- domain = " mysuperawesomesite .com"
2
+ domain = " devopsdeployed .com"
3
3
db_name = " mydb"
4
4
db_user = " foo"
5
- # db_pass = "foobarbaz"
5
+ # db_pass = "foobarbaz"
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ provider "aws" {
22
22
}
23
23
24
24
variable "db_pass_1" {
25
- description = " password for database #2 "
25
+ description = " password for database #1 "
26
26
type = string
27
27
sensitive = true
28
28
}
@@ -38,7 +38,7 @@ module "web_app_1" {
38
38
39
39
# Input Variables
40
40
bucket_name = " web-app-1-devops-directive-web-app-data"
41
- domain = " mysuperawesomesite .com"
41
+ domain = " devopsdeployed .com"
42
42
app_name = " web-app-1"
43
43
environment_name = " production"
44
44
instance_type = " t2.small"
@@ -53,7 +53,7 @@ module "web_app_2" {
53
53
54
54
# Input Variables
55
55
bucket_name = " web-app-2-devops-directive-web-app-data"
56
- domain = " myothersuperawesomesite .com"
56
+ domain = " anotherdevopsdeployed .com"
57
57
app_name = " web-app-2"
58
58
environment_name = " production"
59
59
instance_type = " t2.small"
Original file line number Diff line number Diff line change 1
- - Note about using separate AWS projects (avoids prefix issues, improved IAM control)
1
+ - Note about using separate AWS accounts (avoids prefix issues, improved IAM control)
2
2
- Cover this in advanced section?
3
3
4
4
```
Original file line number Diff line number Diff line change @@ -23,5 +23,5 @@ provider "aws" {
23
23
24
24
# Route53 zone is shared across staging and production
25
25
resource "aws_route53_zone" "primary" {
26
- name = " mysuperawesomesite .com"
27
- }
26
+ name = " devopsdeployed .com"
27
+ }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module "web_app" {
36
36
37
37
# Input Variables
38
38
bucket_name = " devops-directive-web-app-data-${ local . environment_name } "
39
- domain = " mysuperawesomesite .com"
39
+ domain = " devopsdeployed .com"
40
40
environment_name = local. environment_name
41
41
instance_type = " t2.small"
42
42
create_dns_zone = false
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module "web_app" {
36
36
37
37
# Input Variables
38
38
bucket_name = " devops-directive-web-app-data-${ local . environment_name } "
39
- domain = " mysuperawesomesite .com"
39
+ domain = " devopsdeployed .com"
40
40
environment_name = local. environment_name
41
41
instance_type = " t2.micro"
42
42
create_dns_zone = false
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module "web_app" {
36
36
37
37
# Input Variables
38
38
bucket_name = " devops-directive-web-app-data-${ local . environment_name } "
39
- domain = " mysuperawesomesite .com"
39
+ domain = " devopsdeployed .com"
40
40
environment_name = local. environment_name
41
41
instance_type = " t2.small"
42
42
create_dns_zone = terraform. workspace == " production" ? true : false
You can’t perform that action at this time.
0 commit comments