resume-manpage/_meta/iac/provider.aws.data.tf
bdeshi 8befe6d530
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
chore: move meta dir
2024-05-17 10:05:29 +06:00

42 lines
852 B
HCL

data "aws_caller_identity" "current" {}
data "aws_kms_alias" "aws_s3" {
name = "alias/aws/s3"
}
data "aws_iam_policy_document" "s3_cloudfront_access" {
statement {
principals {
type = "Service"
identifiers = ["cloudfront.amazonaws.com"]
}
actions = [
"s3:GetObject",
"s3:ListBucket"
]
resources = [
aws_s3_bucket.created.arn,
"${aws_s3_bucket.created.arn}/*"
]
condition {
test = "StringEquals"
variable = "AWS:SourceArn"
values = [aws_cloudfront_distribution.created.arn]
}
}
}
data "aws_iam_policy_document" "pubilsher" {
statement {
actions = [
"s3:*",
"cloudfront:*"
]
resources = [
aws_s3_bucket.created.arn,
"${aws_s3_bucket.created.arn}/*",
aws_cloudfront_distribution.created.arn
]
}
}