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
|
|
|
|
|
|
|
|
```
|
|
|
|
# Shared infrastructure state stored in Atlas
|
2016-05-02 01:05:54 +02:00
|
|
|
data "terraform_remote_state" "vpc" {
|
2015-05-26 15:35:19 +02:00
|
|
|
backend = "atlas"
|
|
|
|
config {
|
2016-08-03 15:07:57 +02:00
|
|
|
name = "hashicorp/vpc-prod"
|
2015-05-26 15:35:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "aws_instance" "foo" {
|
|
|
|
# ...
|
2016-07-25 22:41:24 +02:00
|
|
|
subnet_id = "${data.terraform_remote_state.vpc.subnet_id}"
|
2015-05-26 15:35:19 +02:00
|
|
|
}
|
|
|
|
```
|