Copilot commented on code in PR #283:
URL:
https://github.com/apache/cloudstack-terraform-provider/pull/283#discussion_r2910362091
##########
website/docs/r/private_gateway.html.markdown:
##########
@@ -51,6 +65,11 @@ The following arguments are supported:
* `vpc_id` - (Required) The VPC ID in which to create this Private gateway.
Changing
this forces a new resource to be created.
+* `bypassvlanoverlapcheck` - (Optional) When set to true, bypasses the VLAN
overlap
+ check during private gateway creation. This allows creating private
gateways with
+ VLANs that may overlap with existing VLANs in the physical network.
Defaults to
+ false.
Review Comment:
The new argument name `bypassvlanoverlapcheck` diverges from the rest of
this resource’s argument naming (e.g., `ip_address`, `physical_network_id`,
`network_offering`). Consider exposing this as a snake_case Terraform argument
(e.g., `bypass_vlan_overlap_check`) and mapping it to the CloudStack API
parameter internally, to keep the resource interface consistent.
##########
cloudstack/resource_cloudstack_private_gateway.go:
##########
@@ -85,6 +85,12 @@ func resourceCloudStackPrivateGateway() *schema.Resource {
Required: true,
ForceNew: true,
},
+
+ "bypassvlanoverlapcheck": {
+ Type: schema.TypeBool,
+ Optional: true,
+ Default: false,
+ },
Review Comment:
`bypassvlanoverlapcheck` is only applied during Create, but the schema does
not mark it `ForceNew` and the Update path doesn’t handle changes to this
field. Changing it after initial creation will plan an in-place update that
cannot actually update the remote private gateway (and can leave state/config
inconsistent). Mark this attribute `ForceNew: true` (preferred) or implement
update semantics if CloudStack supports it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]