Skip to content

Add bypassvlanoverlapcheck parameter to cloudstack_private_gateway #283

Open
bhouse-nexthop wants to merge 2 commits intoapache:mainfrom
bhouse-nexthop:feature/private-gateway-bypass-vlan-overlap-check
Open

Add bypassvlanoverlapcheck parameter to cloudstack_private_gateway #283
bhouse-nexthop wants to merge 2 commits intoapache:mainfrom
bhouse-nexthop:feature/private-gateway-bypass-vlan-overlap-check

Conversation

@bhouse-nexthop
Copy link
Collaborator

  • Add bypassvlanoverlapcheck optional parameter (defaults to false)
  • Parameter allows bypassing VLAN overlap checks during gateway creation
  • Update resource creation logic to pass parameter to CloudStack API
  • Add comprehensive test coverage:
    • Test with bypass enabled
    • Test default value (false)
    • Update import test to ignore field (not returned by API)
  • Update documentation with examples and parameter description
  • All acceptance tests passing (4/4)

…source

- Add bypassvlanoverlapcheck optional parameter (defaults to false)
- Parameter allows bypassing VLAN overlap checks during gateway creation
- Update resource creation logic to pass parameter to CloudStack API
- Add comprehensive test coverage:
  - Test with bypass enabled
  - Test default value (false)
  - Update import test to ignore field (not returned by API)
- Update documentation with examples and parameter description
- All acceptance tests passing (4/4)
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for an optional bypassvlanoverlapcheck flag on cloudstack_private_gateway, enabling callers to bypass CloudStack’s VLAN overlap validation at creation time.

Changes:

  • Documented the new bypassvlanoverlapcheck argument and added an HCL example.
  • Extended the private gateway resource schema and create logic to pass the flag to the CloudStack API.
  • Added/updated acceptance tests to cover explicit true, default false, and import behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
cloudstack/resource_cloudstack_private_gateway.go Adds schema field and wires it into the Create API call.
cloudstack/resource_cloudstack_private_gateway_test.go Adds acceptance tests and updates import verification to ignore the new field.
website/docs/r/private_gateway.html.markdown Documents the new argument and provides an example configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… consistency

The parameter name has been changed from camelCase (bypassvlanoverlapcheck)
to snake_case (bypass_vlan_overlap_check) to maintain consistency with other
resource arguments like ip_address, physical_network_id, and acl_id.

This change affects:
- Resource schema definition
- Resource creation logic
- Test cases and assertions
- Documentation examples

The parameter is now also marked as ForceNew since it can only be set during
gateway creation and cannot be modified afterwards.
@bhouse-nexthop
Copy link
Collaborator Author

@vishesh92 code review comments addressed, please re-request from copilot

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants