Skip to content

Commit ee2e1ab

Browse files
authored
Add ESC terraform-state provider docs (#16419)
* create terraform integrations folder * add esc terraform-state provider docs
1 parent 142d32d commit ee2e1ab

File tree

9 files changed

+121
-15
lines changed

9 files changed

+121
-15
lines changed

content/docs/esc/integrations/infrastructure/terraform.md renamed to content/docs/esc/integrations/infrastructure/terraform/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ h1: "Pulumi ESC: Integrate with Terraform"
55
meta_desc: This page provides an overview on how to use Pulumi ESC with Terraform.
66
menu:
77
esc:
8+
identifier: esc-terraform-integrations
89
parent: esc-inf-tools-integrations
910
weight: 3
1011
aliases:
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title_tag: terraform-state Pulumi ESC Provider
3+
meta_desc: The terraform-state provider enables you to read outputs from Terraform state files stored in S3 or Terraform Cloud.
4+
title: terraform-state
5+
h1: terraform-state
6+
menu:
7+
esc:
8+
identifier: terraform-state
9+
parent: esc-terraform-integrations
10+
weight: 1
11+
aliases:
12+
- /docs/pulumi-cloud/esc/providers/terraform-state/
13+
- /docs/esc/providers/terraform-state/
14+
---
15+
16+
The `terraform-state` provider enables you to read outputs from Terraform state files stored in S3 or Terraform Cloud.
17+
18+
## Example
19+
20+
### S3 backend
21+
22+
```yaml
23+
values:
24+
terraform:
25+
fn::open::terraform-state:
26+
backend:
27+
s3:
28+
login:
29+
fn::open::aws-login:
30+
oidc:
31+
roleArn: arn:aws:iam::123456789012:role/esc-oidc
32+
sessionName: pulumi-environments-session
33+
bucket: my-terraform-state-bucket
34+
key: path/to/terraform.tfstate
35+
region: us-west-2
36+
pulumiConfig:
37+
vpcId: ${terraform.outputs.vpc_id}
38+
subnetIds: ${terraform.outputs.subnet_ids}
39+
```
40+
41+
### Terraform Cloud backend
42+
43+
```yaml
44+
values:
45+
terraform:
46+
fn::open::terraform-state:
47+
backend:
48+
remote:
49+
organization: my-terraform-org
50+
workspace: my-workspace
51+
token:
52+
fn::secret: tfc-token-value
53+
pulumiConfig:
54+
vpcId: ${terraform.outputs.vpc_id}
55+
subnetIds: ${terraform.outputs.subnet_ids}
56+
```
57+
58+
## Inputs
59+
60+
| Property | Type | Description |
61+
|-----------|---------------------|---------------------------------------------------------------|
62+
| `backend` | [Backend](#backend) | Configuration for the Terraform state backend (S3 or remote). |
63+
64+
### Backend
65+
66+
The `backend` property must contain exactly one of the following:
67+
68+
- An [S3 backend configuration](#s3), or
69+
- a [remote](#remote) backend configuration.
70+
71+
#### S3
72+
73+
| Property | Type | Description |
74+
|----------|--------------------------------------------------------------------------|--------------------------------------------------|
75+
| `login` | [aws-login](/docs/esc/integrations/dynamic-login-credentials/aws-login/) | The credentials to use to access the state file. |
76+
| `bucket` | string | The S3 bucket name containing the state file. |
77+
| `key` | string | The S3 object key for the state file. |
78+
| `region` | string | The AWS region where the bucket is located. |
79+
80+
#### Remote
81+
82+
| Property | Type | Description |
83+
|----------------|--------|-----------------------------------------------------------------------------------------|
84+
| `hostname` | string | [Optional] - The remote backend hostname to connect to. Defaults to `app.terraform.io`. |
85+
| `organization` | string | The name of the organization containing the targeted workspace. |
86+
| `workspace` | string | The name of the remote workspace. |
87+
| `token` | string | The token used to authenticate with the remote backend. |
88+
89+
## Outputs
90+
91+
| Property | Type | Description |
92+
|-----------|--------|----------------------------------------------------------------------------------------------------------------------|
93+
| `outputs` | object | A map of all outputs from the Terraform state. Any output marked as sensitive in the terraform state will be secret. |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module aws-import-iac-iam-role-go
22

3-
go 1.21
3+
go 1.23.0
44

5-
toolchain go1.21.0
5+
toolchain go1.24.1
66

77
require (
88
github.com/pulumi/pulumi-aws/sdk/v7 v7.0.0
9-
github.com/pulumi/pulumi/sdk/v3 v3.0.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
1010
)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
module awsx-apigateway-auth-cognito-go
22

3-
go 1.21.12
3+
go 1.23.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/pulumi/pulumi-aws-apigateway/sdk/v3 v3.0.0
79
github.com/pulumi/pulumi-aws/sdk/v7 v7.0.0
8-
github.com/pulumi/pulumi/sdk/v3 v3.0.0
10+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
911
)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module awsx-apigateway-http-proxy-go
22

3-
go 1.21.12
3+
go 1.23.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/pulumi/pulumi-aws-apigateway/sdk/v3 v3.0.0
7-
github.com/pulumi/pulumi/sdk/v3 v3.126.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
810
)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module awsx-apigateway-openapi-full-go
22

3-
go 1.21.12
3+
go 1.23.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/pulumi/pulumi-aws-apigateway/sdk/v3 v3.0.0
7-
github.com/pulumi/pulumi/sdk/v3 v3.126.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
810
)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module awsx-apigateway-openapi-route-go
22

3-
go 1.21.12
3+
go 1.23.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/pulumi/pulumi-aws-apigateway/sdk/v3 v3.0.0
7-
github.com/pulumi/pulumi/sdk/v3 v3.126.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
810
)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module awsx-apigateway-s3-go
22

3-
go 1.21.12
3+
go 1.23.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/pulumi/pulumi-aws-apigateway/sdk/v3 v3.0.0
7-
github.com/pulumi/pulumi/sdk/v3 v3.126.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
810
)
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
module awsx-apigateway-validation-types-go
22

3-
go 1.21.12
3+
go 1.23.0
4+
5+
toolchain go1.24.1
46

57
require (
68
github.com/pulumi/pulumi-aws-apigateway/sdk/v3 v3.0.0
7-
github.com/pulumi/pulumi/sdk/v3 v3.126.0
9+
github.com/pulumi/pulumi/sdk/v3 v3.175.0
810
)

0 commit comments

Comments
 (0)