Skip to content

Commit 187dad4

Browse files
committed
chore: simplify standalone distribution example
1 parent d40c71e commit 187dad4

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

examples/standalone-distribution/cloudfront_distribution.tf

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,25 @@ resource "aws_cloudfront_distribution" "fpjs_cloudfront_distribution" {
4747
}
4848
}
4949

50-
aliases = [var.proxy_subdomain_domain]
51-
viewer_certificate {
52-
acm_certificate_arn = var.certificate_arn
53-
ssl_support_method = "sni-only"
54-
}
55-
56-
# If don't want to serve the distribution from a subdomain for now, use the default certificate instead
57-
# (comment out `viewer_certificate` and `aliases` above and use the `viewer_certificate` below)
58-
50+
# You can make the distribution available on a subdomain of your website
51+
# Uncomment the following and define the referenced variables
52+
# aliases = [var.proxy_subdomain_domain]
5953
# viewer_certificate {
60-
# cloudfront_default_certificate = true
54+
# acm_certificate_arn = var.certificate_arn
55+
# ssl_support_method = "sni-only"
6156
# }
57+
58+
59+
viewer_certificate {
60+
cloudfront_default_certificate = true
61+
}
6262
}
6363

6464
# You can make the distribution available on a subdomain of your website
65-
# (comment this out if you don't want to do that for now)
66-
resource "aws_route53_record" "cloudfront_terraform_new_distribution_record" {
67-
zone_id = var.domain_zone_id
68-
name = var.proxy_subdomain_domain
69-
type = "CNAME"
70-
ttl = 300
71-
records = [aws_cloudfront_distribution.fpjs_cloudfront_distribution.domain_name]
72-
}
65+
# resource "aws_route53_record" "cloudfront_terraform_new_distribution_record" {
66+
# zone_id = var.domain_zone_id
67+
# name = var.proxy_subdomain_domain
68+
# type = "CNAME"
69+
# ttl = 300
70+
# records = [aws_cloudfront_distribution.fpjs_cloudfront_distribution.domain_name]
71+
# }

examples/standalone-distribution/variables.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ variable "fpjs_get_result_path" {
1616
type = string
1717
}
1818

19-
variable "proxy_subdomain_domain" {
20-
description = "The subdomain for the CloudFront distribution, including the root domain of your website, for example `metrics.yourwebsite.com`"
21-
type = string
22-
}
19+
# variable "proxy_subdomain_domain" {
20+
# description = "The subdomain for the CloudFront distribution, including the root domain of your website, for example `metrics.yourwebsite.com`"
21+
# type = string
22+
# }
2323

2424

25-
variable "domain_zone_id" {
26-
description = "Zone ID of the domain for the CloudFront distribution"
27-
type = string
28-
}
25+
# variable "domain_zone_id" {
26+
# description = "Zone ID of the domain for the CloudFront distribution"
27+
# type = string
28+
# }
2929

30-
variable "certificate_arn" {
31-
description = "ARN of the domain certificate for the CloudFront distribution"
32-
type = string
33-
}
30+
# variable "certificate_arn" {
31+
# description = "ARN of the domain certificate for the CloudFront distribution"
32+
# type = string
33+
# }

0 commit comments

Comments
 (0)