Created
November 14, 2018 22:27
-
-
Save mijdavis2/f29697b4fd3592edcd68f936514be775 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gets latest aws linux ami published by amazon | |
# Example use with an optional var: | |
# ${upper(var.ami) == "NONE" ? data.aws_ami.default.id : var.ami} | |
data "aws_ami" "default" { | |
most_recent = true | |
filter { | |
name = "name" | |
values = ["amzn-ami-*-x86_64-gp2"] | |
} | |
filter { | |
name = "virtualization-type" | |
values = ["hvm"] | |
} | |
filter { | |
name = "owner-alias" | |
values = ["amazon"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment