Skip to content

Commit

Permalink
change param sharding_num and coordinator_num to required in opengauss
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason-Zhang9309 committed Mar 2, 2021
1 parent 8f6c570 commit 884eb1f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/resources/gaussdb_opengauss_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ 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` - (Required, Int) The Sharding num. Values: 1~9.

* `coordinator_num` - (Optional, Int) The Coordinator num. Values: 1~32.
* `coordinator_num` - (Required, Int) The Coordinator num. Values: 1~9. 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
10 changes: 6 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,14 @@ func resourceOpenGaussInstance() *schema.Resource {
ForceNew: true,
},
"sharding_num": {
Type: schema.TypeInt,
Optional: true,
Type: schema.TypeInt,
Required: true,
ValidateFunc: validation.IntBetween(1, 9),
},
"coordinator_num": {
Type: schema.TypeInt,
Optional: true,
Type: schema.TypeInt,
Required: true,
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 884eb1f

Please sign in to comment.