Skip to content

Commit

Permalink
[CLOUDGA-25006] Deprecate root node info
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-yb committed Dec 4, 2024
1 parent cb4462b commit 073510d
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 133 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ terraform

# Ignore Intellij files.
.idea/

terraform-provider-ybm
2 changes: 1 addition & 1 deletion docs/data-sources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data "ybm_cluster" "example_cluster" {
- `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.
- `node_config` (Attributes) (see [below for nested schema](#nestedatt--node_config))
- `node_config` (Attributes, Deprecated) (see [below for nested schema](#nestedatt--node_config))
- `num_faults_to_tolerate` (Number) The number of domain faults the cluster can tolerate.
- `project_id` (String) The ID of the project this cluster belongs to.
- `restore_backup_id` (String) The ID of the backup to be restored to the cluster.
Expand Down
27 changes: 12 additions & 15 deletions docs/resources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ resource "ybm_private_service_endpoint" "npsenonok-region" {
- `credentials` (Attributes) Credentials to be used by the database. Please provide 'username' and 'password'
(which would be used in common for both YSQL and YCQL) OR all of 'ysql_username',
'ysql_password', 'ycql_username' and 'ycql_password' but not a mix of both. (see [below for nested schema](#nestedatt--credentials))
- `node_config` (Attributes) (see [below for nested schema](#nestedatt--node_config))

### Optional

Expand All @@ -619,6 +618,7 @@ resource "ybm_private_service_endpoint" "npsenonok-region" {
- `database_track` (String) The track of the database. Production or Innovation or Preview.
- `desired_state` (String) The desired state of the database, Active or Paused. This parameter can be used to pause/resume a cluster.
- `fault_tolerance` (String) The fault tolerance of the cluster. NONE, NODE, ZONE or REGION.
- `node_config` (Attributes, Deprecated) (see [below for nested schema](#nestedatt--node_config))
- `num_faults_to_tolerate` (Number) The number of domain faults the cluster can tolerate. 0 for NONE, 1 for ZONE and [1-3] for NODE and REGION
- `restore_backup_id` (String) The ID of the backup to be restored to the cluster.

Expand All @@ -638,6 +638,7 @@ resource "ybm_private_service_endpoint" "npsenonok-region" {

Required:

- `num_cores` (Number) Number of CPU cores in the nodes of the region.
- `num_nodes` (Number)
- `region` (String)

Expand All @@ -647,7 +648,6 @@ Optional:
- `disk_size_gb` (Number) Disk size of the nodes of the region.
- `is_default` (Boolean)
- `is_preferred` (Boolean)
- `num_cores` (Number) Number of CPU cores in the nodes of the region.
- `public_access` (Boolean)
- `vpc_id` (String)
- `vpc_name` (String)
Expand All @@ -666,19 +666,6 @@ Optional:
- `ysql_username` (String) YSQL username for the database.


<a id="nestedatt--node_config"></a>
### Nested Schema for `node_config`

Required:

- `num_cores` (Number) Number of CPU cores in the node.

Optional:

- `disk_iops` (Number) Disk IOPS of the node.
- `disk_size_gb` (Number) Disk size of the node.


<a id="nestedatt--backup_schedules"></a>
### Nested Schema for `backup_schedules`

Expand Down Expand Up @@ -763,6 +750,16 @@ Optional:



<a id="nestedatt--node_config"></a>
### Nested Schema for `node_config`

Optional:

- `disk_iops` (Number) Disk IOPS of the node.
- `disk_size_gb` (Number) Disk size of the node.
- `num_cores` (Number) Number of CPU cores in the node.


<a id="nestedatt--cluster_info"></a>
### Nested Schema for `cluster_info`

Expand Down
1 change: 1 addition & 0 deletions managed/data_source_cluster_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ func (r dataClusterNameType) GetSchema(_ context.Context) (tfsdk.Schema, diag.Di
Computed: true,
},
}),
DeprecationMessage: "Remove reliance on the attribute as it will be removed in the next major version of the provider. Please use cluster_region_info to read node config instead.",
},
"credentials": {
Computed: true,
Expand Down
Loading

0 comments on commit 073510d

Please sign in to comment.