Difference between revisions of "Terraform data source: aws ami"
Jump to navigation
Jump to search
Line 41: | Line 41: | ||
== See also == | == See also == | ||
+ | * {{aws_ami}} | ||
* {{Terraform data sources}} | * {{Terraform data sources}} | ||
[[Category:Terraform]] | [[Category:Terraform]] |
Revision as of 13:56, 2 April 2023
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami
- AWS instance example with aws ami lookup
data "aws_ami" "my_ubuntu" { most_recent = true filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-hirsute-21.04-amd64-server-*"] } filter { name = "virtualization-type" values = ["hvm"] } owners = ["099720109477"] # Canonical }
data "aws_ami" "amzlinux2" { most_recent = true owners = ["amazon"] filter { name = "name" values = ["amzn2-ami-hvm-*-x86_64-ebs"] } }
Related
- hvm or paravirtual
terraform show | egrep -w "resource|data" | grep -v "#"
aws_availability_zones
aws_instance
aws ec2 describe-images --owners self amazon
values = ["ubuntu/images/hvm-ssd/ubuntu-kinetic-22.10-amd64-server-*"]
See also
Advertising: