Skip to content

Commit

Permalink
Updates terraform docs for provider (#12314)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tcsc committed May 12, 2022
1 parent e845151 commit ea1ddde
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
26 changes: 3 additions & 23 deletions docs/pages/setup/guides/terraform-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,7 @@ $ mkdir -p teleport-terraform
$ cd teleport-terraform
```

## Step 1/4. Install the Terraform provider

<Tabs>
<TabItem label="Linux">
```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
```
</TabItem>

<TabItem label="MacOS">
```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
```
</TabItem>
</Tabs>

## Step 2/4. Create a Terraform user
## Step 1/3. Create a Terraform user

### Enable impersonation

Expand Down Expand Up @@ -147,7 +127,7 @@ The above sequence should result in one PEM-encoded file: `terraform-identity`.
</TabItem>
</Tabs>

## 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.
Expand All @@ -165,7 +145,7 @@ role using Terraform.
</TabItem>
</Tabs>
## Step 4/4. Apply the configuration
## Step 3/3. Apply the configuration
Check the contents of the `teleport-terraform` folder:
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/terraform/terraform-user-role-cloud.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_providers {
teleport = {
source = "terraform.releases.teleport.dev/gravitational/teleport"
version = ">= (=teleport.version=)"
source = "gravitational.com/teleport/teleport"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_providers {
teleport = {
source = "terraform.releases.teleport.dev/gravitational/teleport"
version = ">= (=teleport.version=)"
source = "gravitational.com/teleport/teleport"
}
}
}
Expand Down

0 comments on commit ea1ddde

Please sign in to comment.