From ea1dddecfa98cf45b081924a8980db05beafba76 Mon Sep 17 00:00:00 2001 From: Trent Clarke Date: Tue, 3 May 2022 10:18:39 +1000 Subject: [PATCH] Updates terraform docs for provider (#12314) Updates the Terraform getting started guide to reflect the use of a custome provider registry: * Removes the now-superfluous installation step * Updates examples to reflect actual location of terraform provider --- .../pages/setup/guides/terraform-provider.mdx | 26 +++---------------- .../terraform/terraform-user-role-cloud.tf | 2 +- .../terraform-user-role-self-hosted.tf | 2 +- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/docs/pages/setup/guides/terraform-provider.mdx b/docs/pages/setup/guides/terraform-provider.mdx index b90faa4c9f966..b8345ee5aef36 100644 --- a/docs/pages/setup/guides/terraform-provider.mdx +++ b/docs/pages/setup/guides/terraform-provider.mdx @@ -29,27 +29,7 @@ $ mkdir -p teleport-terraform $ cd teleport-terraform ``` -## Step 1/4. Install the Terraform provider - - - - ```code - $ mkdir -p ${HOME?}/.terraform.d/plugins/gravitational.com/teleport/teleport/(=teleport.version=)/linux_amd64 - $ curl -L -O https://get.gravitational.com/terraform-provider-teleport-v(=teleport.version=)-linux-amd64-bin.tar.gz - $ tar -zxvf terraform-provider-teleport-v(=teleport.version=)-linux-amd64-bin.tar.gz -C ${HOME?}/.terraform.d/plugins/gravitational.com/teleport/teleport/(=teleport.version=)/linux_amd64 - ``` - - - - ```code - $ mkdir -p ${HOME?}/.terraform.d/plugins/gravitational.com/teleport/teleport/(=teleport.version=)/darwin_amd64 - $ curl -L -O https://get.gravitational.com/terraform-provider-teleport-v(=teleport.version=)-darwin-amd64-bin.tar.gz - $ tar -zxvf terraform-provider-teleport-v(=teleport.version=)-darwin-amd64-bin.tar.gz -C ${HOME?}/.terraform.d/plugins/gravitational.com/teleport/teleport/(=teleport.version=)/darwin_amd64 - ``` - - - -## Step 2/4. Create a Terraform user +## Step 1/3. Create a Terraform user ### Enable impersonation @@ -147,7 +127,7 @@ The above sequence should result in one PEM-encoded file: `terraform-identity`. -## Step 3/4. Create a Terraform configuration +## Step 2/3. Create a Terraform configuration Paste the following into a file called `main.tf` to define an example user and role using Terraform. @@ -165,7 +145,7 @@ role using Terraform. -## Step 4/4. Apply the configuration +## Step 3/3. Apply the configuration Check the contents of the `teleport-terraform` folder: diff --git a/examples/resources/terraform/terraform-user-role-cloud.tf b/examples/resources/terraform/terraform-user-role-cloud.tf index cec5b0e38ce74..4df8017333f24 100644 --- a/examples/resources/terraform/terraform-user-role-cloud.tf +++ b/examples/resources/terraform/terraform-user-role-cloud.tf @@ -1,8 +1,8 @@ terraform { required_providers { teleport = { + source = "terraform.releases.teleport.dev/gravitational/teleport" version = ">= (=teleport.version=)" - source = "gravitational.com/teleport/teleport" } } } diff --git a/examples/resources/terraform/terraform-user-role-self-hosted.tf b/examples/resources/terraform/terraform-user-role-self-hosted.tf index 893f977ca352d..253a374b94d3a 100644 --- a/examples/resources/terraform/terraform-user-role-self-hosted.tf +++ b/examples/resources/terraform/terraform-user-role-self-hosted.tf @@ -1,8 +1,8 @@ terraform { required_providers { teleport = { + source = "terraform.releases.teleport.dev/gravitational/teleport" version = ">= (=teleport.version=)" - source = "gravitational.com/teleport/teleport" } } }