-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
37 lines (32 loc) · 915 Bytes
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Input variables
variable "hosted_zone_id" {
type = "string"
description = "The aws_route53_zone zone_id this website will be hosted on."
}
variable "subdomain" {
type = "string"
default = "www"
description = "Subdomain to redirect to priarmy domain"
}
variable "index_document" {
type = "string"
default = "index.html"
description = "Index Document Path"
}
variable "error_document" {
type = "string"
default = "error.html"
description = "Error Document Path"
}
variable "distribution_price_class" {
type = "string"
default = "PriceClass_100"
description = "CloudFront Distribution Price Class"
}
# Derived
locals {
"_search" = "/[.]$/"
"_replace" = ""
"root_fqdn" = "${replace(data.aws_route53_zone.zone.name, local._search, local._replace)}"
"subdomain_fqdn" = "${var.subdomain}.${local.root_fqdn}"
}