This repository has been archived by the owner on Jun 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Smith
committed
Feb 2, 2022
1 parent
0d4d361
commit c6f2ca2
Showing
9 changed files
with
125 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,82 @@ | ||
variable "app_version" { | ||
type = string | ||
type = string | ||
description = "Version of the application to deploy. Maps 1:1 to the tag of the docker image to deploy" | ||
} | ||
|
||
variable "app_name" { | ||
type = string | ||
type = string | ||
description = "System name that can be used to identify this app" | ||
} | ||
|
||
variable "docker_image_repo_url" { | ||
type = string | ||
type = string | ||
description = "URL of the docker image repository for this app. DO NOT INCLUDE the image tag here. (use app_version)" | ||
default = "246316657840.dkr.ecr.eu-west-1.amazonaws.com/checkout-test-website" | ||
default = "246316657840.dkr.ecr.eu-west-1.amazonaws.com/checkout-test-website" | ||
} | ||
|
||
variable "app_domain" { | ||
type = string | ||
type = string | ||
description = "Domain on which the app will be publicly available" | ||
default = "checkout.davidsmith.dev" | ||
default = "checkout.davidsmith.dev" | ||
} | ||
|
||
variable "app_path" { | ||
type = string | ||
type = string | ||
description = "URL path that the app will be available at" | ||
default = "/" | ||
default = "/" | ||
} | ||
|
||
variable "cdn_domain" { | ||
type = string | ||
type = string | ||
description = "Domain on which static assets will be published to" | ||
default = "checkout-cdn.davidsmith.dev" | ||
default = "checkout-cdn.davidsmith.dev" | ||
} | ||
|
||
variable "cdn_path" { | ||
type = string | ||
type = string | ||
description = "URL path that static assets will be available under" | ||
default = "/" | ||
default = "/" | ||
} | ||
|
||
variable "assets_dir" { | ||
type = string | ||
type = string | ||
description = "Relative path to the directory in the app repository that contains static assets" | ||
default = "assets" | ||
default = "assets" | ||
} | ||
|
||
variable "vpc" { | ||
type = object({ | ||
id = string | ||
public_subnets = list(string) | ||
id = string | ||
public_subnets = list(string) | ||
private_subnets = list(string) | ||
}) | ||
description = "Details about the VPC the app should run in" | ||
} | ||
|
||
variable "create_lambda_function" { | ||
type = bool | ||
type = bool | ||
default = true | ||
} | ||
|
||
variable "app_cert" { | ||
description = "Details of the SSL certificate issued for the app's primary domain" | ||
type = object({ | ||
certificate_arn = string | ||
zone_id = string | ||
zone_id = string | ||
}) | ||
} | ||
|
||
variable "cdn_cert" { | ||
description = "Details of the SSL certificate issued for the app's CDN domain" | ||
type = object({ | ||
certificate_arn = string | ||
zone_id = string | ||
zone_id = string | ||
}) | ||
} | ||
|
||
locals { | ||
app_root_domain = regex("[^\\.]+\\.[a-z]+$", var.app_domain) | ||
app_sub_domain = regex("^[^\\.]+", var.app_domain) | ||
app_sub_domain = regex("^[^\\.]+", var.app_domain) | ||
cdn_root_domain = regex("[^\\.]+\\.[a-z]+$", var.cdn_domain) | ||
cdn_sub_domain = regex("^[^\\.]+", var.cdn_domain) | ||
cdn_sub_domain = regex("^[^\\.]+", var.cdn_domain) | ||
} |
Oops, something went wrong.