Difference between revisions of "Terraform data source: data"

From wikieduonline
Jump to navigation Jump to search
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
* https://www.terraform.io/docs/language/data-sources/index.html
 
Available since 2016
 
  
 
TOMERGE: [[Terraform data sources]]
 
TOMERGE: [[Terraform data sources]]
Line 9: Line 7:
 
* [[Data sources]]: <code>[[Data sources: template file|template_file]]</code>, <code>[[template]]</code>
 
* [[Data sources]]: <code>[[Data sources: template file|template_file]]</code>, <code>[[template]]</code>
 
* <code>data</code> [[Terraform blocks|block]]
 
* <code>data</code> [[Terraform blocks|block]]
 
==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 ==
 
== Related terms ==
* [[Terraform AWS]]
+
* [[Terraform AWS]]: [[Terraform AWS data sources|data sources]]
 
* [[Terraform: output]]
 
* [[Terraform: output]]
 
* [[Terraform: plural data source]]
 
* [[Terraform: plural data source]]
 
* <code>[[data.]]</code>
 
* <code>[[data.]]</code>
 +
* <code>[[var.]]</code>
 +
* [[Terraform: provider]], [[Terraform: resource]]
 +
* <code>[[aws_iam_policy_document]]</code>
 +
* <code>[[for_each]]</code>
  
 
== See also ==
 
== See also ==
 
* {{terraform aws data sources}}
 
* {{terraform aws data sources}}
 
* {{terraform data sources}}
 
* {{terraform data sources}}
* {{terraform}}
 
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 18:01, 14 May 2023

Advertising: