Skip to content

Commit

Permalink
set sharding_num and coordinator_num default to 3 in opengauss (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason-Zhang9309 committed Mar 4, 2021
1 parent ad6dd9f commit 908e431
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
5 changes: 3 additions & 2 deletions docs/resources/gaussdb_opengauss_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ The following arguments are supported:
* `configuration_id` - (Optional, String, ForceNew) The parameter template id.
Changing this parameter will create a new resource.

* `sharding_num` - (Optional, Int) The Sharding num. Values: 1~32.
* `sharding_num` - (Optional, Int) The Sharding num. Values: 1~9. The default value is 3.

* `coordinator_num` - (Optional, Int) The Coordinator num. Values: 1~32.
* `coordinator_num` - (Optional, Int) The Coordinator num. Values: 1~9. The default value is 3.
The value must not be greater than twice value of `sharding_num`.

* `enterprise_project_id` - (Optional, String, ForceNew) The enterprise project id.
Changing this parameter will create a new resource.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/go-cleanhttp v0.5.1
github.com/hashicorp/terraform-plugin-sdk v1.13.0
github.com/huaweicloud/golangsdk v0.0.0-20210227060920-53016d30a39b
github.com/huaweicloud/golangsdk v0.0.0-20210302113304-41351a12edfc
github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a
github.com/mitchellh/go-homedir v1.1.0
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ=
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/huaweicloud/golangsdk v0.0.0-20210227060920-53016d30a39b h1:nrUhoqO5BbrPxuWUIVj5Wt/oJoBzyzLiBHVGCCF33tg=
github.com/huaweicloud/golangsdk v0.0.0-20210227060920-53016d30a39b/go.mod h1:fcOI5u+0f62JtJd7zkCch/Z57BNC6bhqb32TKuiF4r0=
github.com/huaweicloud/golangsdk v0.0.0-20210302113304-41351a12edfc h1:CBrAHWGyqIEEh6xvoplHpCX28EE50yApRC1AwqOvc2s=
github.com/huaweicloud/golangsdk v0.0.0-20210302113304-41351a12edfc/go.mod h1:fcOI5u+0f62JtJd7zkCch/Z57BNC6bhqb32TKuiF4r0=
github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a h1:FyS/ubzBR5xJlnJGRTwe7GUHpJOR4ukYK3y+LFNffuA=
github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a/go.mod h1:uoIMjNxUfXi48Ci40IXkPRbghZ1vbti6v9LCbNqRgHY=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
Expand Down
12 changes: 8 additions & 4 deletions huaweicloud/resource_huaweicloud_gaussdb_opengauss_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,16 @@ func resourceOpenGaussInstance() *schema.Resource {
ForceNew: true,
},
"sharding_num": {
Type: schema.TypeInt,
Optional: true,
Type: schema.TypeInt,
Optional: true,
Default: 3,
ValidateFunc: validation.IntBetween(1, 9),
},
"coordinator_num": {
Type: schema.TypeInt,
Optional: true,
Type: schema.TypeInt,
Optional: true,
Default: 3,
ValidateFunc: validation.IntBetween(1, 9),
},
"enterprise_project_id": {
Type: schema.TypeString,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ github.com/hashicorp/terraform-svchost/auth
github.com/hashicorp/terraform-svchost/disco
# github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
github.com/hashicorp/yamux
# github.com/huaweicloud/golangsdk v0.0.0-20210227060920-53016d30a39b
# github.com/huaweicloud/golangsdk v0.0.0-20210302113304-41351a12edfc
## explicit
github.com/huaweicloud/golangsdk
github.com/huaweicloud/golangsdk/internal
Expand Down

0 comments on commit 908e431

Please sign in to comment.