-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathwindows-versions.tf
43 lines (39 loc) · 1.02 KB
/
windows-versions.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
################################################
# Get latest Windows Server AMI with Terraform #
################################################
# Get latest Windows Server 2012R2 AMI
data "aws_ami" "windows-2012-r2" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["Windows_Server-2012-R2_RTM-English-64Bit-Base-*"]
}
}
# Get latest Windows Server 2016 AMI
data "aws_ami" "windows-2016" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["Windows_Server-2016-English-Full-Base*"]
}
}
# Get latest Windows Server 2019 AMI
data "aws_ami" "windows-2019" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["Windows_Server-2019-English-Full-Base*"]
}
}
# Get latest Windows Server 2022 AMI
data "aws_ami" "windows-2022" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["Windows_Server-2022-English-Full-Base*"]
}
}