Skip to content

Commit

Permalink
Fix Terraform README.md (#49046)
Browse files Browse the repository at this point in the history
* Fix Terraform README.md

* Fix readme even more

* Update tf build instructions + fix dead link

---------

Co-authored-by: hugoShaka <[email protected]>
  • Loading branch information
strideynet and hugoShaka authored Nov 15, 2024
1 parent 1ebf8a3 commit 2daed64
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
5 changes: 5 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,11 @@
"destination": "/admin-guides/infrastructure-as-code/teleport-operator/teleport-operator/",
"permanent": true
},
{
"source": "/admin-guides/infrastructure-as-code/terraform-provider/",
"destination": "/admin-guides/infrastructure-as-code/terraform-provider/terraform-provider/",
"permanent": true
},
{
"source": "/management/dynamic-resources/terraform-provider/",
"destination": "/admin-guides/infrastructure-as-code/terraform-provider/terraform-provider/",
Expand Down
26 changes: 11 additions & 15 deletions integrations/terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,30 @@

## Usage

Please, refer to [official documentation](https://goteleport.com/docs/admin-guides/infrastructure-as-code/terraform-provider/).
Please, refer to [official documentation](https://goteleport.com/docs/admin-guides/infrastructure-as-code/terraform-provider/terraform-provider/).

## Development

1. Install [`protobuf`](https://grpc.io/docs/protoc-installation/).
2. Install [`protoc-gen-terraform`](https://github.com/gravitational/protoc-gen-terraform) @v2.2.0.
2. Install [`protoc-gen-terraform`](https://github.com/gravitational/protoc-gen-terraform) @v3.0.0.

```go install github.com/gravitational/protoc-gen-terraform@08768262d29336b8ae0915ef41bb6d9768518c66```
```go install github.com/gravitational/protoc-gen-terraform@c91cc3ef4d7d0046c36cb96b1cd337e466c61225```

3. Install [`Terraform`](https://learn.hashicorp.com/tutorials/terraform/install-cli) v1.1.0+. Alternatively, you can use [`tfenv`](https://github.com/tfutils/tfenv). Please note that on Mac M1 you need to specify `TFENV_ARCH` (ex: `TFENV_ARCH=arm64 tfenv install 1.1.6`).

4. Clone the plugin:
4. Build and install the plugin:

```bash
git clone [email protected]:gravitational/teleport-plugins
```

5. Build and install the plugin:

```bash
cd teleport-plugins/terraform
cd integrations/terraform
make install
```

6. Run tests:
5. Run tests:

```bash
make test
```

Note: Some tests won't pass without a valid `teleport` binary, enterprise license, etc.
See [Testing](../TESTING.md) to see how to provide these values to the tests locally.
# Updating the provider

Run:
Expand All @@ -45,6 +36,11 @@ make gen-tfschema
This will generate `types_tfschema.go` from a current API `.proto` file, and regenerate the provider code.
If the schema changed, you will need to re-render the docs with:
```
make docs
```
# Playing with examples locally
1. Start Teleport.
Expand Down

0 comments on commit 2daed64

Please sign in to comment.