From 2bc16200e2fc3cc547ca81e973b4327ae129a8a7 Mon Sep 17 00:00:00 2001 From: LeCrabe Date: Fri, 31 May 2024 10:47:57 +0200 Subject: [PATCH 1/3] fix: remove all hardcoded region parameters + default="par" --- pkg/attributes/common.go | 5 +++-- pkg/resources/addon/resource_addon_schema.go | 3 ++- pkg/resources/cellar/resource_cellar_schema.go | 3 ++- pkg/resources/materiakv/resource_materiakv_crud.go | 2 +- pkg/resources/materiakv/resource_materiakv_schema.go | 5 ++++- pkg/resources/mongodb/resource_mongodb_crud.go | 3 ++- pkg/resources/mongodb/resource_mongodb_schema.go | 7 +++++-- pkg/resources/postgresql/resource_postgresql_schema.go | 3 ++- 8 files changed, 21 insertions(+), 10 deletions(-) diff --git a/pkg/attributes/common.go b/pkg/attributes/common.go index c6a7d7b..e37c1e5 100644 --- a/pkg/attributes/common.go +++ b/pkg/attributes/common.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" "go.clever-cloud.com/terraform-provider/pkg" @@ -44,8 +45,8 @@ var runtimeCommon = map[string]schema.Attribute{ MarkdownDescription: "Use dedicated instance with given flavor for build step", }, "region": schema.StringAttribute{ - Required: true, - MarkdownDescription: "Geographical region where the app will be deployed", + Default: stringdefault.StaticString("par"), + MarkdownDescription: "Geographical region where the database will be deployed", }, "sticky_sessions": schema.BoolAttribute{ Optional: true, diff --git a/pkg/resources/addon/resource_addon_schema.go b/pkg/resources/addon/resource_addon_schema.go index 233a762..2df7790 100644 --- a/pkg/resources/addon/resource_addon_schema.go +++ b/pkg/resources/addon/resource_addon_schema.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -30,7 +31,7 @@ func (r ResourceAddon) Schema(_ context.Context, req resource.SchemaRequest, res // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the addon"}, "plan": schema.StringAttribute{Required: true, MarkdownDescription: "billing plan"}, - "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the addon will be deployed (when relevant)"}, + "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the addon will be deployed (when relevant)", Default: stringdefault.StaticString("par")}, "third_party_provider": schema.StringAttribute{Required: true, MarkdownDescription: "Provider ID"}, // provider diff --git a/pkg/resources/cellar/resource_cellar_schema.go b/pkg/resources/cellar/resource_cellar_schema.go index 5600287..6299a1c 100644 --- a/pkg/resources/cellar/resource_cellar_schema.go +++ b/pkg/resources/cellar/resource_cellar_schema.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -30,7 +31,7 @@ func (r ResourceCellar) Schema(_ context.Context, req resource.SchemaRequest, re Attributes: map[string]schema.Attribute{ // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the Cellar"}, - "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the data will be stored"}, + "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the data will be stored", Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, diff --git a/pkg/resources/materiakv/resource_materiakv_crud.go b/pkg/resources/materiakv/resource_materiakv_crud.go index aed38bd..5dbb6c3 100644 --- a/pkg/resources/materiakv/resource_materiakv_crud.go +++ b/pkg/resources/materiakv/resource_materiakv_crud.go @@ -59,7 +59,7 @@ func (r *ResourceMateriaKV) Create(ctx context.Context, req resource.CreateReque Name: kv.Name.ValueString(), Plan: plan.ID, ProviderID: "kv", - Region: "par", + Region: kv.Region.ValueString(), } res := tmp.CreateAddon(ctx, r.cc, r.org, addonReq) diff --git a/pkg/resources/materiakv/resource_materiakv_schema.go b/pkg/resources/materiakv/resource_materiakv_schema.go index f7659da..0dbd2e6 100644 --- a/pkg/resources/materiakv/resource_materiakv_schema.go +++ b/pkg/resources/materiakv/resource_materiakv_schema.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -15,6 +16,7 @@ type MateriaKV struct { CreationDate types.Int64 `tfsdk:"creation_date"` Host types.String `tfsdk:"host"` Port types.Int64 `tfsdk:"port"` + Region types.String `tfsdk:"region"` Token types.String `tfsdk:"token"` } @@ -27,7 +29,8 @@ func (r ResourceMateriaKV) Schema(_ context.Context, req resource.SchemaRequest, MarkdownDescription: resourceMateriaKVDoc, Attributes: map[string]schema.Attribute{ // customer provided - "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, + "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, + "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the database will be deployed", Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, "creation_date": schema.Int64Attribute{Computed: true, MarkdownDescription: "Date of database creation"}, diff --git a/pkg/resources/mongodb/resource_mongodb_crud.go b/pkg/resources/mongodb/resource_mongodb_crud.go index bedec88..3cb7ecf 100644 --- a/pkg/resources/mongodb/resource_mongodb_crud.go +++ b/pkg/resources/mongodb/resource_mongodb_crud.go @@ -49,6 +49,7 @@ func (r *ResourceMongoDB) Create(ctx context.Context, req resource.CreateRequest addonsProviders := addonsProvidersRes.Payload() prov := pkg.LookupAddonProvider(*addonsProviders, "mongodb-addon") plan := pkg.LookupProviderPlan(prov, mg.Plan.ValueString()) + // TODO if plan.ID == "" { resp.Diagnostics.AddError("failed to find plan", "expect: "+strings.Join(pkg.ProviderPlansAsList(prov), ", ")+", got: "+mg.Plan.String()) return @@ -58,7 +59,7 @@ func (r *ResourceMongoDB) Create(ctx context.Context, req resource.CreateRequest Name: mg.Name.ValueString(), Plan: plan.ID, ProviderID: "mongodb-addon", - Region: "par", + Region: mg.Region.ValueString(), } res := tmp.CreateAddon(ctx, r.cc, r.org, addonReq) diff --git a/pkg/resources/mongodb/resource_mongodb_schema.go b/pkg/resources/mongodb/resource_mongodb_schema.go index 75deb44..9558697 100644 --- a/pkg/resources/mongodb/resource_mongodb_schema.go +++ b/pkg/resources/mongodb/resource_mongodb_schema.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -13,6 +14,7 @@ type MongoDB struct { ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` Plan types.String `tfsdk:"plan"` + Region types.String `tfsdk:"region"` CreationDate types.Int64 `tfsdk:"creation_date"` Host types.String `tfsdk:"host"` Port types.Int64 `tfsdk:"port"` @@ -29,8 +31,9 @@ func (r ResourceMongoDB) Schema(_ context.Context, req resource.SchemaRequest, r MarkdownDescription: resourceMongoDBDoc, Attributes: map[string]schema.Attribute{ // customer provided - "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, - "plan": schema.StringAttribute{Required: true, MarkdownDescription: "Database size and spec"}, + "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, + "plan": schema.StringAttribute{Required: true, MarkdownDescription: "Database size and spec"}, + "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the database will be deployed", Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, diff --git a/pkg/resources/postgresql/resource_postgresql_schema.go b/pkg/resources/postgresql/resource_postgresql_schema.go index 52f8f43..739d848 100644 --- a/pkg/resources/postgresql/resource_postgresql_schema.go +++ b/pkg/resources/postgresql/resource_postgresql_schema.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -33,7 +34,7 @@ func (r ResourcePostgreSQL) Schema(_ context.Context, req resource.SchemaRequest // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, "plan": schema.StringAttribute{Required: true, MarkdownDescription: "Database size and spec"}, - "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the database will be deployed"}, + "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the database will be deployed", Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, From 5e8b0b2c7e5ba1a0cc8f62c26d4f0600697efe22 Mon Sep 17 00:00:00 2001 From: LeCrabe Date: Fri, 31 May 2024 12:30:52 +0200 Subject: [PATCH 2/3] test: remove default values in schema --- pkg/attributes/common.go | 4 ++-- pkg/resources/addon/resource_addon_schema.go | 3 +-- pkg/resources/cellar/resource_cellar_schema.go | 3 +-- pkg/resources/materiakv/resource_materiakv_schema.go | 3 +-- pkg/resources/materiakv/resource_materiakv_test.go | 2 +- pkg/resources/mongodb/resource_mongodb_crud.go | 1 - pkg/resources/mongodb/resource_mongodb_schema.go | 3 +-- pkg/resources/mongodb/resource_mongodb_test.go | 4 ++-- pkg/resources/postgresql/resource_postgresql_schema.go | 3 +-- 9 files changed, 10 insertions(+), 16 deletions(-) diff --git a/pkg/attributes/common.go b/pkg/attributes/common.go index e37c1e5..7e773e3 100644 --- a/pkg/attributes/common.go +++ b/pkg/attributes/common.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" "go.clever-cloud.com/terraform-provider/pkg" @@ -45,7 +44,8 @@ var runtimeCommon = map[string]schema.Attribute{ MarkdownDescription: "Use dedicated instance with given flavor for build step", }, "region": schema.StringAttribute{ - Default: stringdefault.StaticString("par"), + Required: true, + // Default: stringdefault.StaticString("par"), // TODO default value must be computed before apply MarkdownDescription: "Geographical region where the database will be deployed", }, "sticky_sessions": schema.BoolAttribute{ diff --git a/pkg/resources/addon/resource_addon_schema.go b/pkg/resources/addon/resource_addon_schema.go index 2df7790..d2f3c7d 100644 --- a/pkg/resources/addon/resource_addon_schema.go +++ b/pkg/resources/addon/resource_addon_schema.go @@ -6,7 +6,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -31,7 +30,7 @@ func (r ResourceAddon) Schema(_ context.Context, req resource.SchemaRequest, res // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the addon"}, "plan": schema.StringAttribute{Required: true, MarkdownDescription: "billing plan"}, - "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the addon will be deployed (when relevant)", Default: stringdefault.StaticString("par")}, + "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the addon will be deployed (when relevant)"}, //TODO , Default: stringdefault.StaticString("par")}, "third_party_provider": schema.StringAttribute{Required: true, MarkdownDescription: "Provider ID"}, // provider diff --git a/pkg/resources/cellar/resource_cellar_schema.go b/pkg/resources/cellar/resource_cellar_schema.go index 6299a1c..2849006 100644 --- a/pkg/resources/cellar/resource_cellar_schema.go +++ b/pkg/resources/cellar/resource_cellar_schema.go @@ -6,7 +6,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -31,7 +30,7 @@ func (r ResourceCellar) Schema(_ context.Context, req resource.SchemaRequest, re Attributes: map[string]schema.Attribute{ // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the Cellar"}, - "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the data will be stored", Default: stringdefault.StaticString("par")}, + "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the data will be stored"}, // TODO, Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, diff --git a/pkg/resources/materiakv/resource_materiakv_schema.go b/pkg/resources/materiakv/resource_materiakv_schema.go index 0dbd2e6..009f083 100644 --- a/pkg/resources/materiakv/resource_materiakv_schema.go +++ b/pkg/resources/materiakv/resource_materiakv_schema.go @@ -6,7 +6,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -30,7 +29,7 @@ func (r ResourceMateriaKV) Schema(_ context.Context, req resource.SchemaRequest, Attributes: map[string]schema.Attribute{ // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, - "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the database will be deployed", Default: stringdefault.StaticString("par")}, + "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the data will be stored"}, // TODO, Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, "creation_date": schema.Int64Attribute{Computed: true, MarkdownDescription: "Date of database creation"}, diff --git a/pkg/resources/materiakv/resource_materiakv_test.go b/pkg/resources/materiakv/resource_materiakv_test.go index 1230bc5..ca815f6 100644 --- a/pkg/resources/materiakv/resource_materiakv_test.go +++ b/pkg/resources/materiakv/resource_materiakv_test.go @@ -30,7 +30,7 @@ func TestAccMateriaKV_basic(t *testing.T) { cc := client.New(client.WithAutoOauthConfig()) org := os.Getenv("ORGANISATION") providerBlock := helper.NewProvider("clevercloud").SetOrganisation(org).String() - materiakvBlock := helper.NewRessource("clevercloud_materia_kv", rName).SetOneValue("name", rName).String() + materiakvBlock := helper.NewRessource("clevercloud_materia_kv", rName, helper.SetKeyValues(map[string]any{"name": rName, "region": "par"})).String() resource.Test(t, resource.TestCase{ PreCheck: func() { diff --git a/pkg/resources/mongodb/resource_mongodb_crud.go b/pkg/resources/mongodb/resource_mongodb_crud.go index 3cb7ecf..2946c0e 100644 --- a/pkg/resources/mongodb/resource_mongodb_crud.go +++ b/pkg/resources/mongodb/resource_mongodb_crud.go @@ -49,7 +49,6 @@ func (r *ResourceMongoDB) Create(ctx context.Context, req resource.CreateRequest addonsProviders := addonsProvidersRes.Payload() prov := pkg.LookupAddonProvider(*addonsProviders, "mongodb-addon") plan := pkg.LookupProviderPlan(prov, mg.Plan.ValueString()) - // TODO if plan.ID == "" { resp.Diagnostics.AddError("failed to find plan", "expect: "+strings.Join(pkg.ProviderPlansAsList(prov), ", ")+", got: "+mg.Plan.String()) return diff --git a/pkg/resources/mongodb/resource_mongodb_schema.go b/pkg/resources/mongodb/resource_mongodb_schema.go index 9558697..3060db9 100644 --- a/pkg/resources/mongodb/resource_mongodb_schema.go +++ b/pkg/resources/mongodb/resource_mongodb_schema.go @@ -6,7 +6,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -33,7 +32,7 @@ func (r ResourceMongoDB) Schema(_ context.Context, req resource.SchemaRequest, r // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, "plan": schema.StringAttribute{Required: true, MarkdownDescription: "Database size and spec"}, - "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the database will be deployed", Default: stringdefault.StaticString("par")}, + "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the data will be stored"}, // TODO, Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, diff --git a/pkg/resources/mongodb/resource_mongodb_test.go b/pkg/resources/mongodb/resource_mongodb_test.go index 14ac1c4..f1129ee 100644 --- a/pkg/resources/mongodb/resource_mongodb_test.go +++ b/pkg/resources/mongodb/resource_mongodb_test.go @@ -29,7 +29,7 @@ func TestAccMongoDB_basic(t *testing.T) { cc := client.New(client.WithAutoOauthConfig()) org := os.Getenv("ORGANISATION") providerBlock := helper.NewProvider("clevercloud").SetOrganisation(org).String() - mongodbBlock := helper.NewRessource("clevercloud_mongodb", rName, helper.SetKeyValues(map[string]any{"name": rName, "plan": "dev"})).String() + mongodbBlock := helper.NewRessource("clevercloud_mongodb", rName, helper.SetKeyValues(map[string]any{"name": rName, "plan": "dev", "region": "par"})).String() resource.Test(t, resource.TestCase{ PreCheck: func() { @@ -71,7 +71,7 @@ func TestAccMongoDB_RefreshDeleted(t *testing.T) { cc := client.New(client.WithAutoOauthConfig()) org := os.Getenv("ORGANISATION") providerBlock := helper.NewProvider("clevercloud").SetOrganisation(org).String() - mongodbBlock2 := helper.NewRessource("clevercloud_mongodb", rName, helper.SetKeyValues(map[string]any{"name": rName, "plan": "dev"})).String() + mongodbBlock2 := helper.NewRessource("clevercloud_mongodb", rName, helper.SetKeyValues(map[string]any{"name": rName, "plan": "dev", "region": "par"})).String() resource.Test(t, resource.TestCase{ PreCheck: func() { diff --git a/pkg/resources/postgresql/resource_postgresql_schema.go b/pkg/resources/postgresql/resource_postgresql_schema.go index 739d848..f7a3917 100644 --- a/pkg/resources/postgresql/resource_postgresql_schema.go +++ b/pkg/resources/postgresql/resource_postgresql_schema.go @@ -6,7 +6,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/types" ) @@ -34,7 +33,7 @@ func (r ResourcePostgreSQL) Schema(_ context.Context, req resource.SchemaRequest // customer provided "name": schema.StringAttribute{Required: true, MarkdownDescription: "Name of the service"}, "plan": schema.StringAttribute{Required: true, MarkdownDescription: "Database size and spec"}, - "region": schema.StringAttribute{MarkdownDescription: "Geographical region where the database will be deployed", Default: stringdefault.StaticString("par")}, + "region": schema.StringAttribute{Required: true, MarkdownDescription: "Geographical region where the data will be stored"}, // TODO, Default: stringdefault.StaticString("par")}, // provider "id": schema.StringAttribute{Computed: true, MarkdownDescription: "Generated unique identifier"}, From 98550d7860856d8292919205267cbfbe2fdfdbf4 Mon Sep 17 00:00:00 2001 From: LeCrabe Date: Fri, 31 May 2024 12:37:29 +0200 Subject: [PATCH 3/3] docs: update --- docs/resources/java_war.md | 2 +- docs/resources/materia_kv.md | 1 + docs/resources/mongodb.md | 1 + 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 +- 9 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/resources/java_war.md b/docs/resources/java_war.md index 5a08999..911a665 100644 --- a/docs/resources/java_war.md +++ b/docs/resources/java_war.md @@ -86,7 +86,7 @@ resource "clevercloud_java_war" "myapp" { - `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling - `min_instance_count` (Number) Minimum instance count - `name` (String) Application name -- `region` (String) Geographical region where the app will be deployed +- `region` (String) Geographical region where the database will be deployed - `smallest_flavor` (String) Smallest instance flavor ### Optional diff --git a/docs/resources/materia_kv.md b/docs/resources/materia_kv.md index 86434fa..5c7f581 100644 --- a/docs/resources/materia_kv.md +++ b/docs/resources/materia_kv.md @@ -18,6 +18,7 @@ Manage Materia KV databases ### Required - `name` (String) Name of the service +- `region` (String) Geographical region where the data will be stored ### Read-Only diff --git a/docs/resources/mongodb.md b/docs/resources/mongodb.md index 39b0110..7e84cba 100644 --- a/docs/resources/mongodb.md +++ b/docs/resources/mongodb.md @@ -22,6 +22,7 @@ See [product specification](https://www.clever-cloud.com/fr/product/mongodb/). - `name` (String) Name of the service - `plan` (String) Database size and spec +- `region` (String) Geographical region where the data will be stored ### Read-Only diff --git a/docs/resources/nodejs.md b/docs/resources/nodejs.md index 0a53baa..0c39431 100644 --- a/docs/resources/nodejs.md +++ b/docs/resources/nodejs.md @@ -86,7 +86,7 @@ resource "clevercloud_nodejs" "myapp" { - `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling - `min_instance_count` (Number) Minimum instance count - `name` (String) Application name -- `region` (String) Geographical region where the app will be deployed +- `region` (String) Geographical region where the database will be deployed - `smallest_flavor` (String) Smallest instance flavor ### Optional diff --git a/docs/resources/php.md b/docs/resources/php.md index 6d32b47..df55be4 100644 --- a/docs/resources/php.md +++ b/docs/resources/php.md @@ -24,7 +24,7 @@ See [PHP product](https://www.clever-cloud.com/doc/getting-started/by-language/p - `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling - `min_instance_count` (Number) Minimum instance count - `name` (String) Application name -- `region` (String) Geographical region where the app will be deployed +- `region` (String) Geographical region where the database will be deployed - `smallest_flavor` (String) Smallest instance flavor ### Optional diff --git a/docs/resources/postgresql.md b/docs/resources/postgresql.md index b94fee3..9adab9c 100644 --- a/docs/resources/postgresql.md +++ b/docs/resources/postgresql.md @@ -30,7 +30,7 @@ resource "clevercloud_postgresql" "postgresql_database" { - `name` (String) Name of the service - `plan` (String) Database size and spec -- `region` (String) Geographical region where the database will be deployed +- `region` (String) Geographical region where the data will be stored ### Read-Only diff --git a/docs/resources/python.md b/docs/resources/python.md index 354a406..6bca66b 100644 --- a/docs/resources/python.md +++ b/docs/resources/python.md @@ -86,7 +86,7 @@ resource "clevercloud_python" "myapp" { - `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling - `min_instance_count` (Number) Minimum instance count - `name` (String) Application name -- `region` (String) Geographical region where the app will be deployed +- `region` (String) Geographical region where the database will be deployed - `smallest_flavor` (String) Smallest instance flavor ### Optional diff --git a/docs/resources/scala.md b/docs/resources/scala.md index a2312b2..52ceaba 100644 --- a/docs/resources/scala.md +++ b/docs/resources/scala.md @@ -86,7 +86,7 @@ resource "clevercloud_scala" "myapp" { - `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling - `min_instance_count` (Number) Minimum instance count - `name` (String) Application name -- `region` (String) Geographical region where the app will be deployed +- `region` (String) Geographical region where the database will be deployed - `smallest_flavor` (String) Smallest instance flavor ### Optional diff --git a/docs/resources/static.md b/docs/resources/static.md index 5f1f38a..e4a2aa9 100644 --- a/docs/resources/static.md +++ b/docs/resources/static.md @@ -86,7 +86,7 @@ resource "clevercloud_static" "myapp" { - `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling - `min_instance_count` (Number) Minimum instance count - `name` (String) Application name -- `region` (String) Geographical region where the app will be deployed +- `region` (String) Geographical region where the database will be deployed - `smallest_flavor` (String) Smallest instance flavor ### Optional