Skip to content

Commit

Permalink
Update GCS backend docs for TF >=0.12 (#32065)
Browse files Browse the repository at this point in the history
* Update gcs.mdx

Updated GCS remote backend to include the >=0.12 remote backend data source formatting (incl .output before output name)

* Update gcs.mdx

removed old data source example

* Update gcs.mdx

updated to local_file and output->outputs

* Update gcs.mdx

removed "outputs" from the pre 0.12 ref
  • Loading branch information
lnesteroff committed Oct 28, 2022
1 parent ab45c21 commit 5957d26
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions website/docs/language/settings/backends/gcs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ data "terraform_remote_state" "foo" {
}
}
resource "template_file" "bar" {
template = "${greeting}"
# Terraform >= 0.12
resource "local_file" "foo" {
content = data.terraform_remote_state.foo.outputs.greeting
filename = "${path.module}/outputs.txt"
}
vars {
greeting = "${data.terraform_remote_state.foo.greeting}"
}
# Terraform <= 0.11
resource "local_file" "foo" {
content = "${data.terraform_remote_state.foo.greeting}"
filename = "${path.module}/outputs.txt"
}
```

Expand Down Expand Up @@ -131,4 +135,4 @@ The following configuration options are supported:
Format should be `projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}/cryptoKeys/{{name}}`.
For more information, including IAM requirements, see [Customer-managed Encryption
Keys](https://cloud.google.com/storage/docs/encryption/customer-managed-keys).
- `storage_custom_endpoint` / `GOOGLE_BACKEND_STORAGE_CUSTOM_ENDPOINT` / `GOOGLE_STORAGE_CUSTOM_ENDPOINT` - (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (`/storage/v1/b`, [see here](https://cloud.google.com/storage/docs/json_api/v1/buckets/get#http-request)). You can either use [a DNS name automatically made by the Service Directory](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis#configure-p-dns) or a [custom DNS name](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis#configure-dns-default) made by you. For example, if you create an endpoint called `xyz` and want to use the automatically-created DNS name, you should set the field value as `https://storage-xyz.p.googleapis.com/storage/v1/b`. For help creating a Private Service Connect endpoint using Terraform, [see this guide](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis#terraform_1).
- `storage_custom_endpoint` / `GOOGLE_BACKEND_STORAGE_CUSTOM_ENDPOINT` / `GOOGLE_STORAGE_CUSTOM_ENDPOINT` - (Optional) A URL containing three parts: the protocol, the DNS name pointing to a Private Service Connect endpoint, and the path for the Cloud Storage API (`/storage/v1/b`, [see here](https://cloud.google.com/storage/docs/json_api/v1/buckets/get#http-request)). You can either use [a DNS name automatically made by the Service Directory](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis#configure-p-dns) or a [custom DNS name](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis#configure-dns-default) made by you. For example, if you create an endpoint called `xyz` and want to use the automatically-created DNS name, you should set the field value as `https://storage-xyz.p.googleapis.com/storage/v1/b`. For help creating a Private Service Connect endpoint using Terraform, [see this guide](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis#terraform_1).

0 comments on commit 5957d26

Please sign in to comment.