From c082789b8cdef06ce8f661d393db672bb77da956 Mon Sep 17 00:00:00 2001 From: Alexandre Alencar Date: Thu, 21 Nov 2024 12:52:45 -0700 Subject: [PATCH] Add Earlier Access to Database Track Preview is not valid per the API ``` {"error":{"detail":"This track cannot be used at this time. Please choose another","status":400}} ``` Update docs --- docs/data-sources/cluster.md | 2 +- docs/resources/cluster.md | 2 +- managed/resource_cluster.go | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/data-sources/cluster.md b/docs/data-sources/cluster.md index 9729cd1..687f0b0 100644 --- a/docs/data-sources/cluster.md +++ b/docs/data-sources/cluster.md @@ -43,7 +43,7 @@ data "ybm_cluster" "example_cluster" { - `cluster_version` (String) - `cmk_spec` (Attributes) KMS Provider Configuration. (see [below for nested schema](#nestedatt--cmk_spec)) - `credentials` (Attributes) (see [below for nested schema](#nestedatt--credentials)) -- `database_track` (String) The track of the database. Stable or Preview. +- `database_track` (String) The track of the database. Stable or Early Access. - `desired_state` (String) The desired state of the database, Active or Paused. This parameter can be used to pause/resume a cluster. - `endpoints` (Attributes List) The endpoints used to connect to the cluster. (see [below for nested schema](#nestedatt--endpoints)) - `fault_tolerance` (String) The fault tolerance of the cluster. diff --git a/docs/resources/cluster.md b/docs/resources/cluster.md index 0432de5..60c9efc 100644 --- a/docs/resources/cluster.md +++ b/docs/resources/cluster.md @@ -618,7 +618,7 @@ resource "ybm_private_service_endpoint" "npsenonok-region" { - `cluster_endpoints` (Map of String, Deprecated) The endpoints used to connect to the cluster. - `cluster_id` (String) The ID of the cluster. Created automatically when a cluster is created. Used to get a specific cluster. - `cmk_spec` (Attributes) KMS Provider Configuration. (see [below for nested schema](#nestedatt--cmk_spec)) -- `database_track` (String) The track of the database. Production or Innovation or Preview. +- `database_track` (String) The track of the database. Production or Innovation or Early Access. - `desired_connection_pooling_state` (String) The desired connection pooling state of the cluster, Enabled or Disabled. This parameter can be used to enable/disable Connection Pooling - `desired_state` (String) The desired state of the database, Active or Paused. This parameter can be used to pause/resume a cluster. - `endpoints` (Attributes List) The endpoints used to connect to the cluster. (see [below for nested schema](#nestedatt--endpoints)) diff --git a/managed/resource_cluster.go b/managed/resource_cluster.go index 95ae424..e7bc7eb 100644 --- a/managed/resource_cluster.go +++ b/managed/resource_cluster.go @@ -466,10 +466,12 @@ and modify the backup schedule of the cluster being created.`, Computed: true, }, "database_track": { - Description: "The track of the database. Production or Innovation or Preview.", + Description: "The track of the database. Production or Innovation or Early Access.", Type: types.StringType, Optional: true, Computed: true, + Validators: []tfsdk.AttributeValidator{ + stringvalidator.OneOfCaseInsensitive([]string{"Production","Innovation","Early Access"}...), }, "desired_state": { Description: "The desired state of the database, Active or Paused. This parameter can be used to pause/resume a cluster.",