From 9614285d0e5afb23e074fce5c737528769dd13b8 Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Thu, 21 Dec 2023 11:06:06 +0100 Subject: [PATCH] improve provider dev docs --- dev-docs/workflows/terraform-provider.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dev-docs/workflows/terraform-provider.md b/dev-docs/workflows/terraform-provider.md index 5b1e37b73fc..ac2d4351875 100644 --- a/dev-docs/workflows/terraform-provider.md +++ b/dev-docs/workflows/terraform-provider.md @@ -4,8 +4,25 @@ This document explains the basic ways of working with the [Constellation Terrafo ## Building the Terraform Provider -The Constellation Terraform provider can be built through Bazel, either via the [`devbuild` target](./build-develop-deploy.md) (recommended), which will create a `terraform` directory -with the provider binary and some utility files in the current working directory, or explicitly via this command: +The Constellation Terraform provider can be built through Bazel. + +Recommended: + +Use the [`devbuild` target](./build-develop-deploy.md) (recommended), which will create a `terraform` directory +with the provider binary and some utility files in the dedicated Terraform local registry directory. + +```bash +bazel run //:devbuild' +``` + +IMPORTANT: when making changes on the provider without a commit, subsequent applies will apply due to changed binary hash. To solve this, in your Terraform directory run: + +```bash +rm .terraform.lock.hcl +terraform init --upgrade +``` + +Only build: ```bash bazel build //terraform-provider-constellation:tf_provider