Skip to content

Commit

Permalink
fix(mongodb): [121272265] remove RequiredWith on availability_zone_li…
Browse files Browse the repository at this point in the history
…st and hidden_zone (#3025)

* remove RequiredWith on availability_zone_list and hidden_zone

* add changelog

---------

Co-authored-by: mikatong <mikatong@tencent.com>
  • Loading branch information
tongyiming and mikatong authored Dec 18, 2024
1 parent 53e50b1 commit ec5072f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
7 changes: 7 additions & 0 deletions .changelog/3025.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
resource/tencentcloud_mongodb_instance: remove RequiredWith on `availability_zone_list` and `hidden_zone`
```

```release-note:enhancement
resource/tencentcloud_mongodb_sharding_instance: remove RequiredWith on `availability_zone_list` and `hidden_zone`
```
10 changes: 4 additions & 6 deletions tencentcloud/services/mongodb/resource_tc_mongodb_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,17 @@ func ResourceTencentCloudMongodbInstance() *schema.Resource {
Elem: &schema.Schema{
Type: schema.TypeString,
},
RequiredWith: []string{"hidden_zone"},
Description: `A list of nodes deployed in multiple availability zones. For more information, please use the API DescribeSpecInfo.
- Multi-availability zone deployment nodes can only be deployed in 3 different availability zones. It is not supported to deploy most nodes of the cluster in the same availability zone. For example, a 3-node cluster does not support the deployment of 2 nodes in the same zone.
- Version 4.2 and above are not supported.
- Read-only disaster recovery instances are not supported.
- Basic network cannot be selected.`,
},
"hidden_zone": {
Type: schema.TypeString,
Optional: true,
Computed: true,
RequiredWith: []string{"availability_zone_list"},
Description: "The availability zone to which the Hidden node belongs. This parameter must be configured to deploy instances across availability zones.",
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "The availability zone to which the Hidden node belongs. This parameter is required in cross-AZ instance deployment.",
},
"maintenance_start": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,17 @@ func ResourceTencentCloudMongodbShardingInstance() *schema.Resource {
Elem: &schema.Schema{
Type: schema.TypeString,
},
RequiredWith: []string{"hidden_zone"},
Description: `A list of nodes deployed in multiple availability zones. For more information, please use the API DescribeSpecInfo.
- Multi-availability zone deployment nodes can only be deployed in 3 different availability zones. It is not supported to deploy most nodes of the cluster in the same availability zone. For example, a 3-node cluster does not support the deployment of 2 nodes in the same zone.
- Version 4.2 and above are not supported.
- Read-only disaster recovery instances are not supported.
- Basic network cannot be selected.`,
},
"hidden_zone": {
Type: schema.TypeString,
Optional: true,
Computed: true,
RequiredWith: []string{"availability_zone_list"},
Description: "The availability zone to which the Hidden node belongs. This parameter must be configured to deploy instances across availability zones.",
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "The availability zone to which the Hidden node belongs. This parameter is required in cross-AZ instance deployment.",
},
}
basic := TencentMongodbBasicInfo()
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/mongodb_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The following arguments are supported:
- Read-only disaster recovery instances are not supported.
- Basic network cannot be selected.
* `charge_type` - (Optional, String, ForceNew) The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`. Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will delete old instances and create new one with new charge type.
* `hidden_zone` - (Optional, String) The availability zone to which the Hidden node belongs. This parameter must be configured to deploy instances across availability zones.
* `hidden_zone` - (Optional, String) The availability zone to which the Hidden node belongs. This parameter is required in cross-AZ instance deployment.
* `maintenance_end` - (Optional, String) Maintenance window end time.
- The value range is any full point or half point from `00:00-23:00`, and the maintenance time duration is at least 30 minutes and at most 3 hours.
- The end time must be based on the start time backwards.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/mongodb_sharding_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The following arguments are supported:
- Read-only disaster recovery instances are not supported.
- Basic network cannot be selected.
* `charge_type` - (Optional, String, ForceNew) The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`. Default value is `POSTPAID_BY_HOUR`. Note: TencentCloud International only supports `POSTPAID_BY_HOUR`. Caution that update operation on this field will delete old instances and create new one with new charge type.
* `hidden_zone` - (Optional, String) The availability zone to which the Hidden node belongs. This parameter must be configured to deploy instances across availability zones.
* `hidden_zone` - (Optional, String) The availability zone to which the Hidden node belongs. This parameter is required in cross-AZ instance deployment.
* `mongos_cpu` - (Optional, Int) Number of mongos cpu.
* `mongos_memory` - (Optional, Int) Mongos memory size in GB.
* `mongos_node_num` - (Optional, Int) Number of mongos.
Expand Down

0 comments on commit ec5072f

Please sign in to comment.