mirror of
https://github.com/mr-vercetti/tf-aws-demo.git
synced 2025-07-01 12:35:33 +02:00
Add autoscaling policy and create ami_data module
This commit is contained in:
20
modules/ami_data/main.tf
Executable file
20
modules/ami_data/main.tf
Executable file
@ -0,0 +1,20 @@
|
||||
data "aws_ami" "amazon_linux" {
|
||||
most_recent = true
|
||||
|
||||
filter {
|
||||
name = "name"
|
||||
values = ["amzn2-ami-*-gp2"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "architecture"
|
||||
values = ["x86_64"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "virtualization-type"
|
||||
values = ["hvm"]
|
||||
}
|
||||
|
||||
owners = ["amazon"]
|
||||
}
|
3
modules/ami_data/outputs.tf
Executable file
3
modules/ami_data/outputs.tf
Executable file
@ -0,0 +1,3 @@
|
||||
output "amazon_linux" {
|
||||
value = data.aws_ami.amazon_linux
|
||||
}
|
Reference in New Issue
Block a user