-
Notifications
You must be signed in to change notification settings - Fork 3
/
ami.tf
51 lines (42 loc) · 928 Bytes
/
ami.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
51
data "aws_ami" "default_node_image" {
most_recent = true
name_regex = "^ubuntu/.*focal-20.04-.*-server-\\d+(\\.\\d+)?$"
owners = ["099720109477"]
filter {
name = "name"
values = ["ubuntu/*focal*"]
}
filter {
name = "architecture"
values = [var.architecture]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}
data "aws_ami" "default_master_image" {
most_recent = true
name_regex = "^ubuntu/.*focal-20.04-.*-server-\\d+(\\.\\d+)?$"
owners = ["099720109477"]
filter {
name = "name"
values = ["ubuntu/*focal*"]
}
filter {
name = "architecture"
values = [coalesce(var.master_architecture, var.architecture)]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
}