Skip to content

Commit

Permalink
fix(materia): rename resource to match product
Browse files Browse the repository at this point in the history
  • Loading branch information
miton18 committed Apr 15, 2024
1 parent c6d3fd2 commit edd96b8
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 30 deletions.
2 changes: 0 additions & 2 deletions docs/resources/addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 0 additions & 2 deletions docs/resources/cellar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 0 additions & 2 deletions docs/resources/cellar_bucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 0 additions & 2 deletions docs/resources/java_war.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


10 changes: 4 additions & 6 deletions docs/resources/materiakv.md → docs/resources/materiadb_kv.md
Original file line number Diff line number Diff line change
@@ -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



Expand All @@ -26,5 +26,3 @@ description: |-
- `id` (String) Generated unique identifier
- `port` (Number) Database port
- `token` (String) Token to authenticate


2 changes: 0 additions & 2 deletions docs/resources/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 0 additions & 2 deletions docs/resources/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 0 additions & 2 deletions docs/resources/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ resource "clevercloud_postgresql" "postgresql_database" {
- `password` (String) Login password
- `port` (Number) Database port
- `user` (String) Login username


2 changes: 0 additions & 2 deletions docs/resources/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 0 additions & 2 deletions docs/resources/scala.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 0 additions & 2 deletions docs/resources/static.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


2 changes: 1 addition & 1 deletion pkg/resources/materiakv/resource_materiakv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
1 change: 1 addition & 0 deletions pkg/resources/materiakv/resource_materiakv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Manage MateriaDB KV databases
2 changes: 1 addition & 1 deletion pkg/resources/materiakv/resource_materiakv_crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/materiakv/resource_materiakv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/materiakv/resource_materiakv_test_block.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resource "clevercloud_materiakv" "%s" {
resource "clevercloud_materiadb_kv" "%s" {
name = "%s"
}

0 comments on commit edd96b8

Please sign in to comment.