-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.tf
50 lines (42 loc) · 936 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
42
43
44
45
46
47
48
49
50
data "aws_availability_zones" "this" {
state = "available"
}
data "aws_iam_policy_document" "role" {
statement {
actions = ["sts:AssumeRole"]
effect = "Allow"
principals {
identifiers = ["vpc-flow-logs.amazonaws.com"]
type = "Service"
}
}
}
data "aws_iam_policy_document" "role_policy_cloudwatch" {
statement {
actions = [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:DescribeLogGroups",
"logs:DescribeLogStreams"
]
effect = "Allow"
resources = ["*"]
}
}
data "aws_vpc" "default" {
default = true
}
data "aws_security_group" "default" {
vpc_id = data.aws_vpc.default.id
filter {
name = "group-name"
values = ["default"]
}
}
data "aws_subnet_ids" "default" {
vpc_id = data.aws_vpc.default.id
}
data "aws_subnet" "default" {
id = element(tolist(data.aws_subnet_ids.default.ids), 0)
}