2015-05-26 15:35:19 +02:00
|
|
|
---
|
|
|
|
layout: "terraform"
|
|
|
|
page_title: "Provider: Terraform"
|
|
|
|
sidebar_current: "docs-terraform-index"
|
|
|
|
description: |-
|
|
|
|
The Terraform provider is used to access meta data from shared infrastructure.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Terraform Provider
|
|
|
|
|
2016-05-02 01:05:54 +02:00
|
|
|
The terraform provider provides access to outputs from the Terraform state
|
|
|
|
of shared infrastructure.
|
2015-05-26 15:35:19 +02:00
|
|
|
|
2016-05-02 01:05:54 +02:00
|
|
|
Use the navigation to the left to read about the available data sources.
|
2015-05-26 15:35:19 +02:00
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-08 01:56:35 +02:00
|
|
|
```hcl
|
2015-05-26 15:35:19 +02:00
|
|
|
# Shared infrastructure state stored in Atlas
|
2016-05-02 01:05:54 +02:00
|
|
|
data "terraform_remote_state" "vpc" {
|
2017-02-18 23:48:50 +01:00
|
|
|
backend = "atlas"
|
|
|
|
|
|
|
|
config {
|
|
|
|
name = "hashicorp/vpc-prod"
|
|
|
|
}
|
2015-05-26 15:35:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "aws_instance" "foo" {
|
2017-02-18 23:48:50 +01:00
|
|
|
# ...
|
|
|
|
subnet_id = "${data.terraform_remote_state.vpc.subnet_id}"
|
2015-05-26 15:35:19 +02:00
|
|
|
}
|
|
|
|
```
|