From 61fd030cd9e9398161ceb4b59cd1c0a0a3b05cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9a=20Grondier?= Date: Wed, 18 Dec 2024 16:39:57 +0100 Subject: [PATCH] Rename resource to exoscale_dbaas_DBTYPE_user --- pkg/resources/database/resource_kafka_test.go | 2 +- pkg/resources/database/resource_mysql_test.go | 2 +- pkg/resources/database/resource_opensearch_test.go | 2 +- pkg/resources/database/resource_pg_test.go | 2 +- pkg/resources/database/resource_user_kafka.go | 2 +- pkg/resources/database/resource_user_mysql.go | 2 +- pkg/resources/database/resource_user_opensearch.go | 2 +- pkg/resources/database/resource_user_pg.go | 2 +- pkg/resources/database/testdata/resource_user_kafka.tmpl | 2 +- pkg/resources/database/testdata/resource_user_mysql.tmpl | 2 +- pkg/resources/database/testdata/resource_user_opensearch.tmpl | 2 +- pkg/resources/database/testdata/resource_user_pg.tmpl | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/resources/database/resource_kafka_test.go b/pkg/resources/database/resource_kafka_test.go index 449efe74..a5ad9800 100644 --- a/pkg/resources/database/resource_kafka_test.go +++ b/pkg/resources/database/resource_kafka_test.go @@ -81,7 +81,7 @@ func testResourceKafka(t *testing.T) { Version: "3.7", } - userFullResourceName := "exoscale_database_kafka_user.test_user" + userFullResourceName := "exoscale_dbaas_kafka_user.test_user" userDataBase := TemplateModelKafkaUser{ ResourceName: "test_user", Username: "foo", diff --git a/pkg/resources/database/resource_mysql_test.go b/pkg/resources/database/resource_mysql_test.go index 30bcb4f7..61651690 100644 --- a/pkg/resources/database/resource_mysql_test.go +++ b/pkg/resources/database/resource_mysql_test.go @@ -75,7 +75,7 @@ func testResourceMysql(t *testing.T) { Version: "8", } - userFullResourceName := "exoscale_database_mysql_user.test_user" + userFullResourceName := "exoscale_dbaas_mysql_user.test_user" userDataBase := TemplateModelMysqlUser{ ResourceName: "test_user", Username: "foo", diff --git a/pkg/resources/database/resource_opensearch_test.go b/pkg/resources/database/resource_opensearch_test.go index 49fa7587..43f1bb24 100644 --- a/pkg/resources/database/resource_opensearch_test.go +++ b/pkg/resources/database/resource_opensearch_test.go @@ -91,7 +91,7 @@ func testResourceOpensearch(t *testing.T) { Version: "1", } - userFullResourceName := "exoscale_database_opensearch_user.test_user" + userFullResourceName := "exoscale_dbaas_opensearch_user.test_user" userDataBase := TemplateModelOpensearchUser{ ResourceName: "test_user", Username: "foo", diff --git a/pkg/resources/database/resource_pg_test.go b/pkg/resources/database/resource_pg_test.go index db0f363f..304085f0 100644 --- a/pkg/resources/database/resource_pg_test.go +++ b/pkg/resources/database/resource_pg_test.go @@ -71,7 +71,7 @@ func testResourcePg(t *testing.T) { Version: "13", } - userFullResourceName := "exoscale_database_pg_user.test_user" + userFullResourceName := "exoscale_dbaas_pg_user.test_user" userDataBase := TemplateModelPgUser{ ResourceName: "test_user", Username: "foo", diff --git a/pkg/resources/database/resource_user_kafka.go b/pkg/resources/database/resource_user_kafka.go index 554e954c..1a35b6fa 100644 --- a/pkg/resources/database/resource_user_kafka.go +++ b/pkg/resources/database/resource_user_kafka.go @@ -42,7 +42,7 @@ func (r *KafkaUserResource) Configure(ctx context.Context, req resource.Configur } func (r *KafkaUserResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_database_kafka_user" + resp.TypeName = req.ProviderTypeName + "_dbaas_kafka_user" } func (r *KafkaUserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { diff --git a/pkg/resources/database/resource_user_mysql.go b/pkg/resources/database/resource_user_mysql.go index 064bf8bc..8d578415 100644 --- a/pkg/resources/database/resource_user_mysql.go +++ b/pkg/resources/database/resource_user_mysql.go @@ -44,7 +44,7 @@ func (r *MysqlUserResource) Configure(ctx context.Context, req resource.Configur } func (r *MysqlUserResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_database_mysql_user" + resp.TypeName = req.ProviderTypeName + "_dbaas_mysql_user" } func (r *MysqlUserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { diff --git a/pkg/resources/database/resource_user_opensearch.go b/pkg/resources/database/resource_user_opensearch.go index ba590a26..e218c399 100644 --- a/pkg/resources/database/resource_user_opensearch.go +++ b/pkg/resources/database/resource_user_opensearch.go @@ -39,7 +39,7 @@ func (r *OpensearchUserResource) Configure(ctx context.Context, req resource.Con } func (r *OpensearchUserResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_database_opensearch_user" + resp.TypeName = req.ProviderTypeName + "_dbaas_opensearch_user" } func (r *OpensearchUserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { diff --git a/pkg/resources/database/resource_user_pg.go b/pkg/resources/database/resource_user_pg.go index 71192585..9a781d1a 100644 --- a/pkg/resources/database/resource_user_pg.go +++ b/pkg/resources/database/resource_user_pg.go @@ -42,7 +42,7 @@ func (r *PGUserResource) Configure(ctx context.Context, req resource.ConfigureRe } func (r *PGUserResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_database_pg_user" + resp.TypeName = req.ProviderTypeName + "_dbaas_pg_user" } func (r *PGUserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { diff --git a/pkg/resources/database/testdata/resource_user_kafka.tmpl b/pkg/resources/database/testdata/resource_user_kafka.tmpl index 431c4dc3..82ec25a2 100644 --- a/pkg/resources/database/testdata/resource_user_kafka.tmpl +++ b/pkg/resources/database/testdata/resource_user_kafka.tmpl @@ -1,4 +1,4 @@ -resource "exoscale_database_kafka_user" {{ .ResourceName }} { +resource "exoscale_dbaas_kafka_user" {{ .ResourceName }} { username = "{{ .Username }}" service = {{ .Service }} zone = "{{ .Zone }}" diff --git a/pkg/resources/database/testdata/resource_user_mysql.tmpl b/pkg/resources/database/testdata/resource_user_mysql.tmpl index 809aa612..2d4127fe 100644 --- a/pkg/resources/database/testdata/resource_user_mysql.tmpl +++ b/pkg/resources/database/testdata/resource_user_mysql.tmpl @@ -1,4 +1,4 @@ -resource "exoscale_database_mysql_user" {{ .ResourceName }} { +resource "exoscale_dbaas_mysql_user" {{ .ResourceName }} { username = "{{ .Username }}" service = {{ .Service }} zone = "{{ .Zone }}" diff --git a/pkg/resources/database/testdata/resource_user_opensearch.tmpl b/pkg/resources/database/testdata/resource_user_opensearch.tmpl index 3f737cb0..bfd8d654 100644 --- a/pkg/resources/database/testdata/resource_user_opensearch.tmpl +++ b/pkg/resources/database/testdata/resource_user_opensearch.tmpl @@ -1,4 +1,4 @@ -resource "exoscale_database_opensearch_user" {{ .ResourceName }} { +resource "exoscale_dbaas_opensearch_user" {{ .ResourceName }} { username = "{{ .Username }}" service = {{ .Service }} zone = "{{ .Zone }}" diff --git a/pkg/resources/database/testdata/resource_user_pg.tmpl b/pkg/resources/database/testdata/resource_user_pg.tmpl index 4de2cd60..cc470502 100644 --- a/pkg/resources/database/testdata/resource_user_pg.tmpl +++ b/pkg/resources/database/testdata/resource_user_pg.tmpl @@ -1,4 +1,4 @@ -resource "exoscale_database_pg_user" {{ .ResourceName }} { +resource "exoscale_dbaas_pg_user" {{ .ResourceName }} { username = "{{ .Username }}" service = {{ .Service }} zone = "{{ .Zone }}"