You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which indicates that the id of the private network does not match the id required by ovh_cloud_project_network_private_subnet_v2, because it needs to be a UUID
Terraform Version
1.10.4
OVH Terraform Provider Version
1.6.0
Affected Resource(s)
Please list the resources as a list, for example:
ovh_cloud_project_network_private_subnet_v2
ovh_cloud_project_network_private
Terraform Configuration Files
resource "ovh_cloud_project_network_private" "privnet" {
service_name = var.service
name = var.network_name
regions = [var.region]
}
Being able to pass the id of the generated network programmatically like it is possible with v1.
Actual Behavior
We got an error saying that the Id given is not a UUID
Steps to Reproduce
terraform apply
Additional context
We're trying to set DNS settings for the private network, which is possible only with ovh_cloud_project_network_private_subnet_v2, which doesn't work in conjunction with ovh_cloud_project_network_private.
The text was updated successfully, but these errors were encountered:
Indeed you can't directly use the id of resource ovh_cloud_project_network_private in the subnet. However the id that you need to use (the OpenStack id) is also in the resource, you can use the following configuration:
While this solution works, I doubt this is the intended or definitive experience for such simple use cases?
From my understanding, the issue comes from ovh_cloud_project_network_private_subnet_v2 relying on the underlying OpenStack network id, which can also be solved like this, using the OpenStack provider (as is suggested in the OVHCloud Terraform guide):
variable "netregion" {
type = string
default = "GRA9"
}
resource "ovh_cloud_project_network_private" "privnet" {
service_name = "<public cloud project id>"
name = "test"
regions = [var.netregion]
vlan_id = 10
}
data "openstack_networking_network_v2" "os_privnet" {
name = ovh_cloud_project_network_private.privnet.name
}
resource "ovh_cloud_project_network_private_subnet_v2" "privnet_subnet" {
service_name = ovh_cloud_project_network_private.privnet.service_name
network_id = data.openstack_networking_network_v2.os_privnet.id
name = "private-subnet"
region = var.netregion
dns_nameservers = ["8.8.8.8"]
cidr = "10.10.12.0/24"
dhcp = true
enable_gateway_ip = true
use_default_public_dns_resolver = false
}
This is a bit cleaner, in my opinion, but still not a satsfying experience from an OVH Cloud user's point of view.
Describe the bug
resource "ovh_cloud_project_network_private" "privnet" {
service_name = var.service
name = var.network_name
regions = [var.region]
}
resource "ovh_cloud_project_network_private_subnet_v2" "privnet_subnet" {
service_name = ovh_cloud_project_network_private.privnet.service_name
network_id = ovh_cloud_project_network_private.privnet.id
name = "private-subnet"
region = var.region
dns_nameservers = ["8.8.8.8"]
cidr = var.ip_range
dhcp = true
enable_gateway_ip = true
use_default_public_dns_resolver = true
}
produces the following error:
│ Error: calling POST /cloud/project/<project_id>/region//network/pn-123456_0/subnet with params &{private-subnet 10.99.0.0/16 4 [] [8.8.8.8] [] true true 0x1400000ed60}:
│ "OVHcloud API error (status code 400): Client::BadRequest: "invalid: invalid uuid 'pn-123456_0': invalid UUID length: 12" (X-OVH-Query-Id: EU.ext-4.67a9f19e.3691819.23b1cae19716ba7ee48ca2db5ef80ebf)"
which indicates that the id of the private network does not match the id required by ovh_cloud_project_network_private_subnet_v2, because it needs to be a UUID
Terraform Version
1.10.4
OVH Terraform Provider Version
1.6.0
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
resource "ovh_cloud_project_network_private" "privnet" {
service_name = var.service
name = var.network_name
regions = [var.region]
}
resource "ovh_cloud_project_network_private_subnet_v2" "privnet_subnet" {
service_name = ovh_cloud_project_network_private.privnet.service_name
network_id = ovh_cloud_project_network_private.privnet.id
name = "private-subnet"
region = var.region
dns_nameservers = ["8.8.8.8"]
cidr = var.ip_range
dhcp = true
enable_gateway_ip = true
use_default_public_dns_resolver = true
}
Debug Output
│ Error: calling POST /cloud/project/<project_id>/region//network/pn-123456_0/subnet with params &{private-subnet 10.99.0.0/16 4 [] [8.8.8.8] [] true true 0x1400000ed60}:
│ "OVHcloud API error (status code 400): Client::BadRequest: "invalid: invalid uuid 'pn-123456_0': invalid UUID length: 12" (X-OVH-Query-Id: EU.ext-4.67a9f19e.3691819.23b1cae19716ba7ee48ca2db5ef80ebf)"
Expected Behavior
Being able to pass the id of the generated network programmatically like it is possible with v1.
Actual Behavior
We got an error saying that the Id given is not a UUID
Steps to Reproduce
terraform apply
Additional context
We're trying to set DNS settings for the private network, which is possible only with ovh_cloud_project_network_private_subnet_v2, which doesn't work in conjunction with ovh_cloud_project_network_private.
The text was updated successfully, but these errors were encountered: