-
-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathmain.tf
More file actions
54 lines (50 loc) · 2.37 KB
/
Copy pathmain.tf
File metadata and controls
54 lines (50 loc) · 2.37 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
locals {
wp_nocache_behavior = {
viewer_protocol_policy = "redirect-to-https"
cached_methods = ["GET", "HEAD"]
allowed_methods = ["HEAD", "DELETE", "POST", "GET", "OPTIONS", "PUT", "PATCH"]
default_ttl = 60
min_ttl = 0
max_ttl = 86400
compress = true
target_origin_id = "wordpress-cloudposse.com"
forward_cookies = "all"
forward_header_values = ["*"]
forward_query_string = true
lambda_function_association = []
cache_policy_id = ""
origin_request_policy_id = ""
}
}
module "cdn" {
source = "../../"
name = "wordpress"
attributes = ["cloudposse.com"]
aliases = ["cloudposse.com", "www.cloudposse.com"]
origin_domain_name = "origin.cloudposse.com"
origin_protocol_policy = "match-viewer"
viewer_protocol_policy = "redirect-to-https"
parent_zone_name = "cloudposse.com"
default_root_object = ""
acm_certificate_arn = "xxxxxxxxxxxxxxxxxxx"
forward_cookies = "whitelist"
forward_cookies_whitelisted_names = ["comment_author_*", "comment_author_email_*", "comment_author_url_*", "wordpress_logged_in_*", "wordpress_test_cookie", "wp-settings-*"]
forward_headers = ["Host", "Origin", "Access-Control-Request-Headers", "Access-Control-Request-Method"]
forward_query_string = true
default_ttl = 60
min_ttl = 0
max_ttl = 86400
compress = true
cached_methods = ["GET", "HEAD"]
allowed_methods = ["GET", "HEAD", "OPTIONS"]
price_class = "PriceClass_All"
ordered_cache = [
merge(local.wp_nocache_behavior, { path_pattern = "wp-admin/*" }),
merge(local.wp_nocache_behavior, { path_pattern = "wp-login.php" }),
merge(local.wp_nocache_behavior, { path_pattern = "wp-signup.php" }),
merge(local.wp_nocache_behavior, { path_pattern = "wp-trackback.php" }),
merge(local.wp_nocache_behavior, { path_pattern = "wp-cron.php" }),
merge(local.wp_nocache_behavior, { path_pattern = "xmlrpc.php" })
]
context = module.this.context
}