Difference between revisions of "Terraform data source: data"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
  
 
==Example==
 
==Example==
<pre>
 
data "aws_ami" "example" {
 
  most_recent = true
 
  
  owners = ["self"]
+
[[data]] "aws_ami" "myexample" {
  tags = {
+
  most_recent = true
    Name  = "app-server"
+
    Tested = "true"
+
  owners = ["self"]
  }
+
  tags = {
}
+
    Name  = "app-server"
</pre>
+
    Tested = "true"
 +
  }
 +
}
  
 
== Related terms ==
 
== Related terms ==

Revision as of 19:27, 15 September 2021


Example

data "aws_ami" "myexample" {
  most_recent = true

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

Related terms

See also

Advertising: