forked from aws-ia/terraform-aws-polygon-technology-edge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.tf
41 lines (36 loc) · 895 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
33
34
35
36
37
38
39
40
41
data "null_data_source" "downloaded_package" {
inputs = {
id = null_resource.download_package.id
filename = local.downloaded
}
}
data "aws_availability_zones" "current" {}
data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
data "aws_iam_policy_document" "genesis_s3" {
version = "2012-10-17"
statement {
actions = [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket"
]
resources = [
module.s3.s3_bucket_arn,
"${module.s3.s3_bucket_arn}/*"
]
}
}
data "aws_iam_policy_document" "genesis_ssm" {
version = "2012-10-17"
statement {
actions = [
"ssm:GetParameter",
"ssm:GetParameters",
"ssm:GetParametersByPath"
]
resources = [
"arn:aws:ssm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:parameter/${var.ssm_parameter_id}/*"
]
}
}