From 51f5169cc89f0a702d097885359cd7443a18fc69 Mon Sep 17 00:00:00 2001 From: Muhammad Yusuf <949842+fluxynet@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:28:01 +0400 Subject: [PATCH] CCX-5008 empty parameters (#29) --- Makefile | 4 ++-- README.md | 6 +++--- examples/example_datastore.tf | 2 +- internal/ccx/api/datastore_dbparams.go | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 4def3a4..4aa759f 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ clean: rm -rf ./bin/terraform-provider-ccx install: bin/terraform-provider-ccx - mkdir -p ~/.terraform.d/plugins/registry.terraform.io/severalnines/ccx/0.3.1/linux_amd64 - cp ./bin/terraform-provider-ccx ~/.terraform.d/plugins/registry.terraform.io/severalnines/ccx/0.3.1/linux_amd64/ + mkdir -p ~/.terraform.d/plugins/registry.terraform.io/severalnines/ccx/0.3.2/linux_amd64 + cp ./bin/terraform-provider-ccx ~/.terraform.d/plugins/registry.terraform.io/severalnines/ccx/0.3.2/linux_amd64/ docs: go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs diff --git a/README.md b/README.md index d1743c5..2089932 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ terraform { required_providers { ccx = { source = "severalnines/ccx" - version = "~> 0.3.1" + version = "~> 0.3.2" } } } @@ -164,7 +164,7 @@ Clone, build and place the plugin in the right folder. 1. Clone: `git clone https://github.com/severalnines/terraform-provider-ccx` 2. Build: `go build -o ./bin/terraform-provider-ccx.exe ./cmd/terraform-provider-ccx` 3. Place: `./bin/terraform-provider-ccx.exe` - as `%APPDATA%/terraform.d/plugins/registry.terraform.io/severalnines/ccx/0.3.1/windows_amd64/terraform-provider-ccx.exe` + as `%APPDATA%/terraform.d/plugins/registry.terraform.io/severalnines/ccx/0.3.2/windows_amd64/terraform-provider-ccx.exe` ## Using the provider @@ -179,7 +179,7 @@ terraform { required_providers { ccx = { source = "severalnines/ccx" - version = "~> 0.3.1" + version = "~> 0.3.2" } } } diff --git a/examples/example_datastore.tf b/examples/example_datastore.tf index be27278..a146a64 100644 --- a/examples/example_datastore.tf +++ b/examples/example_datastore.tf @@ -2,7 +2,7 @@ terraform { required_providers { ccx = { source = "severalnines/ccx" - version = "~> 0.3.1" + version = "~> 0.3.2" } } } diff --git a/internal/ccx/api/datastore_dbparams.go b/internal/ccx/api/datastore_dbparams.go index 8a564c0..412a1e1 100644 --- a/internal/ccx/api/datastore_dbparams.go +++ b/internal/ccx/api/datastore_dbparams.go @@ -73,6 +73,10 @@ func (svc *DatastoreService) GetParameters(ctx context.Context, storeID string) parameters := make(map[string]string, len(rs.Parameters)) for k, v := range rs.Parameters { + if v.Value == "" { // not set, skip + continue + } + parameters[k] = v.Value }