From edd96b8b560791969e29c2f44eb0314237f28bbe Mon Sep 17 00:00:00 2001 From: miton18 Date: Mon, 15 Apr 2024 10:56:11 +0200 Subject: [PATCH] fix(materia): rename resource to match product --- docs/resources/addon.md | 2 -- docs/resources/cellar.md | 2 -- docs/resources/cellar_bucket.md | 2 -- docs/resources/java_war.md | 2 -- docs/resources/{materiakv.md => materiadb_kv.md} | 10 ++++------ docs/resources/nodejs.md | 2 -- docs/resources/php.md | 2 -- docs/resources/postgresql.md | 2 -- docs/resources/python.md | 2 -- docs/resources/scala.md | 2 -- docs/resources/static.md | 2 -- pkg/resources/materiakv/resource_materiakv.go | 2 +- pkg/resources/materiakv/resource_materiakv.md | 1 + pkg/resources/materiakv/resource_materiakv_crud.go | 2 +- pkg/resources/materiakv/resource_materiakv_test.go | 2 +- .../materiakv/resource_materiakv_test_block.tf | 2 +- 16 files changed, 9 insertions(+), 30 deletions(-) rename docs/resources/{materiakv.md => materiadb_kv.md} (71%) diff --git a/docs/resources/addon.md b/docs/resources/addon.md index fe02d03..e318ddb 100644 --- a/docs/resources/addon.md +++ b/docs/resources/addon.md @@ -34,5 +34,3 @@ List of available providers: - `configurations` (Map of String, Sensitive) Any configuration exposed by the addon - `creation_date` (Number) Date of database creation - `id` (String) Generated unique identifier - - diff --git a/docs/resources/cellar.md b/docs/resources/cellar.md index d7ecc2d..62627f4 100644 --- a/docs/resources/cellar.md +++ b/docs/resources/cellar.md @@ -29,5 +29,3 @@ See [product specification](https://www.clever-cloud.com/doc/deploy/addon/cellar - `id` (String) Generated unique identifier - `key_id` (String) Key ID used to authenticate - `key_secret` (String, Sensitive) Key secret used to authenticate - - diff --git a/docs/resources/cellar_bucket.md b/docs/resources/cellar_bucket.md index 24ad9b6..9ed1765 100644 --- a/docs/resources/cellar_bucket.md +++ b/docs/resources/cellar_bucket.md @@ -22,5 +22,3 @@ See [product specification](https://www.clever-cloud.com/doc/deploy/addon/cellar - `cellar_id` (String) Cellar's reference - `id` (String) Name of the bucket - - diff --git a/docs/resources/java_war.md b/docs/resources/java_war.md index bd10190..5a08999 100644 --- a/docs/resources/java_war.md +++ b/docs/resources/java_war.md @@ -129,5 +129,3 @@ Optional: - `pre_run` (String) [CC_PRE_RUN_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#pre-run-cc_pre_run_hook) - `run_failed` (String) [CC_RUN_FAILED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - `run_succeed` (String) [CC_RUN_SUCCEEDED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - - diff --git a/docs/resources/materiakv.md b/docs/resources/materiadb_kv.md similarity index 71% rename from docs/resources/materiakv.md rename to docs/resources/materiadb_kv.md index 033896e..890f673 100644 --- a/docs/resources/materiakv.md +++ b/docs/resources/materiadb_kv.md @@ -1,14 +1,14 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "clevercloud_materiakv Resource - terraform-provider-clevercloud" +page_title: "clevercloud_materiadb_kv Resource - terraform-provider-clevercloud" subcategory: "" description: |- - + Manage MateriaDB KV databases --- -# clevercloud_materiakv (Resource) - +# clevercloud_materiadb_kv (Resource) +Manage MateriaDB KV databases @@ -26,5 +26,3 @@ description: |- - `id` (String) Generated unique identifier - `port` (Number) Database port - `token` (String) Token to authenticate - - diff --git a/docs/resources/nodejs.md b/docs/resources/nodejs.md index ad86acd..0a53baa 100644 --- a/docs/resources/nodejs.md +++ b/docs/resources/nodejs.md @@ -133,5 +133,3 @@ Optional: - `pre_run` (String) [CC_PRE_RUN_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#pre-run-cc_pre_run_hook) - `run_failed` (String) [CC_RUN_FAILED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - `run_succeed` (String) [CC_RUN_SUCCEEDED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - - diff --git a/docs/resources/php.md b/docs/resources/php.md index 7a3bf98..6d32b47 100644 --- a/docs/resources/php.md +++ b/docs/resources/php.md @@ -70,5 +70,3 @@ Optional: - `pre_run` (String) [CC_PRE_RUN_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#pre-run-cc_pre_run_hook) - `run_failed` (String) [CC_RUN_FAILED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - `run_succeed` (String) [CC_RUN_SUCCEEDED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - - diff --git a/docs/resources/postgresql.md b/docs/resources/postgresql.md index 53d87aa..b94fee3 100644 --- a/docs/resources/postgresql.md +++ b/docs/resources/postgresql.md @@ -41,5 +41,3 @@ resource "clevercloud_postgresql" "postgresql_database" { - `password` (String) Login password - `port` (Number) Database port - `user` (String) Login username - - diff --git a/docs/resources/python.md b/docs/resources/python.md index e25257a..354a406 100644 --- a/docs/resources/python.md +++ b/docs/resources/python.md @@ -130,5 +130,3 @@ Optional: - `pre_run` (String) [CC_PRE_RUN_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#pre-run-cc_pre_run_hook) - `run_failed` (String) [CC_RUN_FAILED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - `run_succeed` (String) [CC_RUN_SUCCEEDED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - - diff --git a/docs/resources/scala.md b/docs/resources/scala.md index e827517..a2312b2 100644 --- a/docs/resources/scala.md +++ b/docs/resources/scala.md @@ -128,5 +128,3 @@ Optional: - `pre_run` (String) [CC_PRE_RUN_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#pre-run-cc_pre_run_hook) - `run_failed` (String) [CC_RUN_FAILED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - `run_succeed` (String) [CC_RUN_SUCCEEDED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - - diff --git a/docs/resources/static.md b/docs/resources/static.md index 819892b..5f1f38a 100644 --- a/docs/resources/static.md +++ b/docs/resources/static.md @@ -128,5 +128,3 @@ Optional: - `pre_run` (String) [CC_PRE_RUN_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#pre-run-cc_pre_run_hook) - `run_failed` (String) [CC_RUN_FAILED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - `run_succeed` (String) [CC_RUN_SUCCEEDED_HOOK](https://www.clever-cloud.com/doc/develop/build-hooks/#run-succeeded-cc_run_succeeded_hook-or-failed-cc_run_failed_hook) - - diff --git a/pkg/resources/materiakv/resource_materiakv.go b/pkg/resources/materiakv/resource_materiakv.go index af61b2f..65f7685 100644 --- a/pkg/resources/materiakv/resource_materiakv.go +++ b/pkg/resources/materiakv/resource_materiakv.go @@ -17,5 +17,5 @@ func NewResourceMateriaKV() resource.Resource { } func (r *ResourceMateriaKV) Metadata(ctx context.Context, req resource.MetadataRequest, res *resource.MetadataResponse) { - res.TypeName = req.ProviderTypeName + "_materiakv" + res.TypeName = req.ProviderTypeName + "_materiadb_kv" } diff --git a/pkg/resources/materiakv/resource_materiakv.md b/pkg/resources/materiakv/resource_materiakv.md index e69de29..4e8a081 100644 --- a/pkg/resources/materiakv/resource_materiakv.md +++ b/pkg/resources/materiakv/resource_materiakv.md @@ -0,0 +1 @@ +Manage MateriaDB KV databases \ No newline at end of file diff --git a/pkg/resources/materiakv/resource_materiakv_crud.go b/pkg/resources/materiakv/resource_materiakv_crud.go index cb965d3..3454032 100644 --- a/pkg/resources/materiakv/resource_materiakv_crud.go +++ b/pkg/resources/materiakv/resource_materiakv_crud.go @@ -78,7 +78,7 @@ func (r *ResourceMateriaKV) Create(ctx context.Context, req resource.CreateReque kvInfoRes := tmp.GetMateriaKV(ctx, r.cc, r.org, kv.ID.ValueString()) if kvInfoRes.HasError() { - resp.Diagnostics.AddError("failed to get materiakv connection infos", kvInfoRes.Error().Error()) + resp.Diagnostics.AddError("failed to get materiadb connection infos", kvInfoRes.Error().Error()) return } diff --git a/pkg/resources/materiakv/resource_materiakv_test.go b/pkg/resources/materiakv/resource_materiakv_test.go index 15ca50f..57dfbe1 100644 --- a/pkg/resources/materiakv/resource_materiakv_test.go +++ b/pkg/resources/materiakv/resource_materiakv_test.go @@ -31,7 +31,7 @@ var protoV6Provider = map[string]func() (tfprotov6.ProviderServer, error){ func TestAccMateriaKV_basic(t *testing.T) { ctx := context.Background() rName := fmt.Sprintf("tf-test-kv-%d", time.Now().UnixMilli()) - fullName := fmt.Sprintf("clevercloud_materiakv.%s", rName) + fullName := fmt.Sprintf("clevercloud_materiadb_kv.%s", rName) cc := client.New(client.WithAutoOauthConfig()) org := os.Getenv("ORGANISATION") diff --git a/pkg/resources/materiakv/resource_materiakv_test_block.tf b/pkg/resources/materiakv/resource_materiakv_test_block.tf index 0eca423..265e5bc 100644 --- a/pkg/resources/materiakv/resource_materiakv_test_block.tf +++ b/pkg/resources/materiakv/resource_materiakv_test_block.tf @@ -1,3 +1,3 @@ -resource "clevercloud_materiakv" "%s" { +resource "clevercloud_materiadb_kv" "%s" { name = "%s" }