-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.tf
32 lines (28 loc) · 756 Bytes
/
data.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
data "aws_iam_policy_document" "s3_policy" {
statement {
actions = ["s3:GetObject"]
resources = ["${module.s3.s3_bucket_arn}/*"]
principals {
type = "AWS"
identifiers = module.cdn.cloudfront_origin_access_identity_iam_arns
}
}
depends_on = [
module.cdn.cloudfront_distribution_id
]
}
data "aws_iam_policy_document" "s3_policy_merge" {
source_policy_documents = [
data.aws_iam_policy_document.s3_policy.json,
var.policy
]
}
data "aws_cloudfront_response_headers_policy" "this" {
name = "Managed-SecurityHeadersPolicy"
}
data "aws_cloudfront_cache_policy" "this" {
name = "Managed-CachingOptimized"
}
data "aws_cloudfront_origin_request_policy" "this" {
name = "Managed-CORS-S3Origin"
}