Skip to content

Commit

Permalink
GH-4 Creating AWS infrastructure to host old website
Browse files Browse the repository at this point in the history
  • Loading branch information
ameyrupji committed May 15, 2019
1 parent f1ab2f7 commit 2e0721b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
*.tfstate.*


**/workspace/**
**/workspace/**


.DS_Store
2 changes: 2 additions & 0 deletions terraform/environments/beta/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ code-subdomain = "code.beta"
iac-subdomain = "iac.beta"
blog-subdomain = "blog.beta"
images-subdomain = "images.beta"
old-subdomain = "old.beta"

main-domain = "beta.ameyrupji.com"
alternate-domain = "www.beta.ameyrupji.com"
code-domain = "code.beta.ameyrupji.com"
iac-domain = "iac.beta.ameyrupji.com"
blog-domain = "blog.beta.ameyrupji.com"
images-domain = "images.beta.ameyrupji.com"
old-domain = "old.beta.ameyrupji.com"

api-gateway-name = "api-beta-ameyrupji"
api-subdomain = "api.beta"
Expand Down
2 changes: 2 additions & 0 deletions terraform/environments/prod/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ code-subdomain = "code"
iac-subdomain = "iac"
blog-subdomain = "blog"
images-subdomain = "images"
old-subdomain = "old"

main-domain = "ameyrupji.com"
alternate-domain = "www.ameyrupji.com"
code-domain = "code.ameyrupji.com"
iac-domain = "iac.ameyrupji.com"
blog-domain = "blog.ameyrupji.com"
images-domain = "images.ameyrupji.com"
old-domain = "old.ameyrupji.com"

api-gateway-name = "ameyrupji"
api-subdomain = "api."
Expand Down
9 changes: 9 additions & 0 deletions terraform/src/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ module "s3_images_domain" {
bucket_name = "${var.images-domain}"
}

# bucket for old subdomain
module "s3_old_domain" {
source = "./modules/s3_web_hosting"

subdomain = "${var.old-subdomain}"
domain = "${var.domain}"
bucket_name = "${var.old-domain}"
}

module "post_email_lambda" {
source = "./modules/api_lambda_with_logging"

Expand Down
4 changes: 4 additions & 0 deletions terraform/src/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ variable "blog-subdomain" {}

variable "images-subdomain" {}

variable "old-subdomain" {}

variable "main-domain" {}

variable "alternate-domain" {}
Expand All @@ -30,6 +32,8 @@ variable "blog-domain" {}

variable "images-domain" {}

variable "old-domain" {}

variable "api-gateway-name" {}

variable "api-subdomain" {}
Expand Down

0 comments on commit 2e0721b

Please sign in to comment.