-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.tf
More file actions
40 lines (31 loc) · 760 Bytes
/
data.tf
File metadata and controls
40 lines (31 loc) · 760 Bytes
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
locals {
architecture = data.aws_ec2_instance_type.this.supported_architectures[0]
}
data "aws_region" "current" {}
data "aws_caller_identity" "this" {}
data "aws_ec2_instance_type" "this" {
instance_type = var.instance_type
}
data "aws_vpc" "this" {
id = var.vpc_id
}
data "aws_subnet" "private" {
for_each = toset(var.private_subnet_ids)
id = each.value
}
data "aws_route_table" "private" {
count = length(var.private_subnet_ids)
subnet_id = var.private_subnet_ids[count.index]
}
data "aws_ami" "amazon_linux_2" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["al2023-ami-2023*${local.architecture}"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}