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 11name : " Terraform"
22
33on :
4- # Uncomment to enable staging deployment
5- # push:
6- # branches:
7- # - main
4+ push :
5+ branches :
6+ - main
87 release :
98 types : [published]
109 pull_request :
Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ resource "aws_lb" "load_balancer" {
182182}
183183
184184resource "aws_route53_zone" "primary" {
185- name = " mysuperawesomesite .com"
185+ name = " devopsdeployed .com"
186186}
187187
188188resource "aws_route53_record" "root" {
189189 zone_id = aws_route53_zone. primary . zone_id
190- name = " mysuperawesomesite .com"
190+ name = " devopsdeployed .com"
191191 type = " A"
192192
193193 alias {
Original file line number Diff line number Diff line change 11bucket_name = " devops-directive-web-app-data"
2- domain = " mysuperawesomesite .com"
2+ domain = " devopsdeployed .com"
33db_name = " mydb"
44db_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" {
2222}
2323
2424variable "db_pass_1" {
25- description = " password for database #2 "
25+ description = " password for database #1 "
2626 type = string
2727 sensitive = true
2828}
@@ -38,7 +38,7 @@ module "web_app_1" {
3838
3939 # Input Variables
4040 bucket_name = " web-app-1-devops-directive-web-app-data"
41- domain = " mysuperawesomesite .com"
41+ domain = " devopsdeployed .com"
4242 app_name = " web-app-1"
4343 environment_name = " production"
4444 instance_type = " t2.small"
@@ -53,7 +53,7 @@ module "web_app_2" {
5353
5454 # Input Variables
5555 bucket_name = " web-app-2-devops-directive-web-app-data"
56- domain = " myothersuperawesomesite .com"
56+ domain = " anotherdevopsdeployed .com"
5757 app_name = " web-app-2"
5858 environment_name = " production"
5959 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)
22 - Cover this in advanced section?
33
44```
Original file line number Diff line number Diff line change @@ -23,5 +23,5 @@ provider "aws" {
2323
2424# Route53 zone is shared across staging and production
2525resource "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" {
3636
3737 # Input Variables
3838 bucket_name = " devops-directive-web-app-data-${ local . environment_name } "
39- domain = " mysuperawesomesite .com"
39+ domain = " devopsdeployed .com"
4040 environment_name = local. environment_name
4141 instance_type = " t2.small"
4242 create_dns_zone = false
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module "web_app" {
3636
3737 # Input Variables
3838 bucket_name = " devops-directive-web-app-data-${ local . environment_name } "
39- domain = " mysuperawesomesite .com"
39+ domain = " devopsdeployed .com"
4040 environment_name = local. environment_name
4141 instance_type = " t2.micro"
4242 create_dns_zone = false
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module "web_app" {
3636
3737 # Input Variables
3838 bucket_name = " devops-directive-web-app-data-${ local . environment_name } "
39- domain = " mysuperawesomesite .com"
39+ domain = " devopsdeployed .com"
4040 environment_name = local. environment_name
4141 instance_type = " t2.small"
4242 create_dns_zone = terraform. workspace == " production" ? true : false
You can’t perform that action at this time.
0 commit comments