forked from DNXLabs/terraform-aws-ecs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_data.tf
41 lines (33 loc) · 780 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 "aws_region" "current" {}
data "aws_ami" "amzn" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn2-ami-ecs-hvm*"]
}
filter {
name = "architecture"
values = [var.architecture]
}
name_regex = ".+-ebs$"
}
data "aws_subnet" "private_subnets" {
count = length(var.private_subnet_ids)
id = var.private_subnet_ids[count.index]
}
data "aws_caller_identity" "current" {}
data "aws_iam_account_alias" "current" {
count = var.alarm_prefix == "" ? 1 : 0
}
#-------
# KMS
data "aws_kms_key" "ebs" {
key_id = "alias/aws/ebs"
}
data "aws_kms_key" "efs" {
key_id = "alias/aws/elasticfilesystem"
}
data "aws_ec2_managed_prefix_list" "s3" {
name = "com.amazonaws.${data.aws_region.current.name}.s3"
}