Skip to content

Commit

Permalink
Clarify usage of min/max throughput and instances (hashicorp#10130)
Browse files Browse the repository at this point in the history
* Clarify usage of min/max throughput and instances

* fix lint

* fix snake casing

[upstream:2089d74fe1ddf00362c76d82dbcebe95fafc9142]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Mar 21, 2024
1 parent 17fa00e commit bb42a1c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .changelog/10130.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:Update documentation for vpcaccess min/max instances and throughput

```
35 changes: 21 additions & 14 deletions google/services/vpcaccess/resource_vpc_access_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,41 @@ func ResourceVPCAccessConnector() *schema.Resource {
Default: "e2-micro",
},
"max_instances": {
Type: schema.TypeInt,
Computed: true,
Optional: true,
ForceNew: true,
Description: `Maximum value of instances in autoscaling group underlying the connector.`,
Type: schema.TypeInt,
Computed: true,
Optional: true,
ForceNew: true,
Description: `Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be
higher than the value specified by min_instances.`,
},
"max_throughput": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
ValidateFunc: validation.IntBetween(200, 1000),
Description: `Maximum throughput of the connector in Mbps, must be greater than 'min_throughput'. Default is 300.`,
Default: 300,
Description: `Maximum throughput of the connector in Mbps, must be greater than 'min_throughput'. Default is 300. Refers to the expected throughput
when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by
min_throughput. If both max_throughput and max_instances are provided, max_instances takes precedence over max_throughput. The use of
max_throughput is discouraged in favor of max_instances.`,
Default: 300,
},
"min_instances": {
Type: schema.TypeInt,
Computed: true,
Optional: true,
ForceNew: true,
Description: `Minimum value of instances in autoscaling group underlying the connector.`,
Type: schema.TypeInt,
Computed: true,
Optional: true,
ForceNew: true,
Description: `Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be
lower than the value specified by max_instances.`,
},
"min_throughput": {
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
ValidateFunc: validation.IntBetween(200, 1000),
Description: `Minimum throughput of the connector in Mbps. Default and min is 200.`,
Default: 200,
Description: `Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type.
Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. If both min_throughput and
min_instances are provided, min_instances takes precedence over min_throughput. The use of min_throughput is discouraged in favor of min_instances.`,
Default: 200,
},
"network": {
Type: schema.TypeString,
Expand Down
15 changes: 11 additions & 4 deletions website/docs/r/vpc_access_connector.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,26 @@ The following arguments are supported:

* `min_throughput` -
(Optional)
Minimum throughput of the connector in Mbps. Default and min is 200.
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type.
Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. If both min_throughput and
min_instances are provided, min_instances takes precedence over min_throughput. The use of min_throughput is discouraged in favor of min_instances.

* `min_instances` -
(Optional)
Minimum value of instances in autoscaling group underlying the connector.
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be
lower than the value specified by max_instances.

* `max_instances` -
(Optional)
Maximum value of instances in autoscaling group underlying the connector.
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be
higher than the value specified by min_instances.

* `max_throughput` -
(Optional)
Maximum throughput of the connector in Mbps, must be greater than `min_throughput`. Default is 300.
Maximum throughput of the connector in Mbps, must be greater than `min_throughput`. Default is 300. Refers to the expected throughput
when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by
min_throughput. If both max_throughput and max_instances are provided, max_instances takes precedence over max_throughput. The use of
max_throughput is discouraged in favor of max_instances.

* `subnet` -
(Optional)
Expand Down

0 comments on commit bb42a1c

Please sign in to comment.