From 2daed640a2fae47753f8a138c16ddd741645f7e1 Mon Sep 17 00:00:00 2001 From: Noah Stride Date: Fri, 15 Nov 2024 16:03:24 +0000 Subject: [PATCH] Fix Terraform README.md (#49046) * Fix Terraform README.md * Fix readme even more * Update tf build instructions + fix dead link --------- Co-authored-by: hugoShaka --- docs/config.json | 5 +++++ integrations/terraform/README.md | 26 +++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/config.json b/docs/config.json index b3bc08103cdba..0fda3cd2fb9fc 100644 --- a/docs/config.json +++ b/docs/config.json @@ -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/", diff --git a/integrations/terraform/README.md b/integrations/terraform/README.md index 52b8c48050028..53e752f725d41 100644 --- a/integrations/terraform/README.md +++ b/integrations/terraform/README.md @@ -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 git@github.com: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: @@ -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.