Create openstack instance from port

trying to create openstack instance from the port which is created in terraform resource previder which is created previously.

example snippet

resource “openstack_compute_instance_v2” “test” {

name = “test-vm-${count.index+1}”

image_name = “cirros-0.5.1-x86_64-raw”

flavor_name = “m1.tiny”
security_groups = [“default”]

block_device {
uuid = “bd6cea18-adbc-430c-887a-775111039083” #uuid of the image
source_type = “image”
volume_size = 10
boot_index = 0
destination_type = “volume”
delete_on_termination = true
}

network {
port_id=“openstack_networking_port_v2.instance-ports.id”
}
}

error:

Error: Unsupported argument

on ports.tf line 68, in resource “openstack_compute_instance_v2” “test”:
68: port_id=“openstack_networking_port_v2.instance-ports.id”

An argument named “port_id” is not expected here.

terraform version and provider details:
Terraform v0.12.26

  • provider.openstack v1.40.0