Terraform data source: data

From wikieduonline
Revision as of 10:44, 28 February 2022 by Welcome (talk | contribs) (→‎See also)
Jump to navigation Jump to search

Example

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami

data "aws_ami" "myexample" {
  most_recent = true

  owners = ["self"]
  tags = {
    Name   = "app-server"
    Tested = "true"
  }
}

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc

data "aws_vpc" "selected" {
  id = var.my_vpc_id
}

Related terms

See also

Advertising: