cloudstack-terraform-provider icon indicating copy to clipboard operation
cloudstack-terraform-provider copied to clipboard

feat: make cidr optional for L2 networks

Open sidshas03 opened this issue 2 months ago • 4 comments

  • Add 'type' field to cloudstack_network resource schema
  • Make 'cidr' field conditionally required based on network type
  • L2 networks: cidr not required, IP parameters skipped
  • L3 networks: cidr required, maintains backward compatibility
  • Add CustomizeDiff validation for proper type/cidr combinations
  • Update parseCIDR function to handle L2 networks without cidr
  • Update resource creation logic to skip IP config for L2 networks
  • Update read function to detect and set network type
  • Add comprehensive test coverage for L2 networks
  • Update documentation with L2 and L3 usage examples

Fixes #214

sidshas03 avatar Sep 15 '25 14:09 sidshas03