-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbeta.tf
More file actions
69 lines (57 loc) · 1.71 KB
/
beta.tf
File metadata and controls
69 lines (57 loc) · 1.71 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module "beta_site" {
source = "./modules/phlask-baseline-resources"
env_name = "beta"
default_cache_behavior = {
default_ttl = 300
max_ttl = 600
function_association = [
{
event_type = "viewer-request"
function_arn = aws_cloudfront_function.react-url-rewrite.arn
}
]
}
ordered_cache_behavior = [
{
path_pattern = "submit-image"
allowed_methods = ["GET", "HEAD"]
cached_methods = ["GET", "HEAD"]
cache_policy_id = data.aws_cloudfront_cache_policy.caching_optimized.id
lambda_function_association = [
{
event_type = "viewer-request"
include_body = false
lambda_arn = aws_lambda_function.image_submission_handler.qualified_arn
}
]
},
{
path_pattern = "/images/*"
allowed_methods = ["GET","HEAD"]
cached_methods = ["GET","HEAD"]
cache_policy_id = data.aws_cloudfront_cache_policy.caching_optimized.id
target_origin_id = local.images_origin_id
function_association = [
{
event_type = "viewer-request"
function_arn = aws_cloudfront_function.image-path-cleanup.arn
}
]
}
]
common_domain = var.common_domain
origin_access_control_id_images = aws_cloudfront_origin_access_control.images.id
phlask_images_bucket_name = aws_s3_bucket.images.id
phlask_logs_bucket_name = aws_s3_bucket.logs.id
providers = {
aws.us-east-1 = aws.us-east-1
}
}
module "storybook_beta_site" {
source = "./modules/storybook-resources"
env_name = "beta"
common_domain = var.common_domain
providers = {
aws = aws.us-east-1
}
}