Skip to content

Conversation

@thekrauss
Copy link

Description

This PR addresses issue #1115 by enabling the attachment of multiple private network interfaces to a Public Cloud instance.

Previously, the provider limited the network.private block to a single item (MaxItems: 1). This change allows users to define multiple private blocks to connect an instance to multiple vRacks/Subnets simultaneously (e.g., Front/Back architecture).

Type of change

• Schema: Changed network.private from TypeSet to TypeList to ensure interface ordering (eth1, eth2...) is respected and removed the MaxItems: 1 restriction.

• Structures: Updated Network struct to handle a slice of private networks ([]*PrivateNetwork) instead of a single pointer.

• Logic: Updated GetNetwork helper to iterate over all defined private blocks and construct the correct payload for the API

resource "ovh_cloud_project_instance" "multinic_instance" {
  service_name   = "XXX"
  region         = "GRA11"
  name           = "multi-nic-instance"
  flavor_id      = "UUID"
  image_id       = "UUID"

  network {
    public = true

    private {
      network {
        id        = private.net_front.id
        subnet_id = subnet.subnet_front.id
      }
      ip = "10.0.1.10"
    }

    private {
      network {
        id        = private.net_back.id
        subnet_id = subnet.subnet_back.id
      }
    }
  }
}

@thekrauss thekrauss requested a review from a team as a code owner November 25, 2025 15:13
@thekrauss thekrauss force-pushed the dev/thekrauss/cloud-instances-with-multiple-network branch from 348e671 to 7393bff Compare November 26, 2025 06:04
@thekrauss thekrauss force-pushed the dev/thekrauss/cloud-instances-with-multiple-network branch from 46387fb to 5b90aea Compare November 26, 2025 13:42
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.

1 participant