Terraform data source: aws ami

From wikieduonline
Revision as of 18:47, 28 February 2023 by Newworld (talk | contribs)
Jump to navigation Jump to search
data "aws_ami" "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

See also

Advertising: