Skip to content

private_ip is null for scaleway_instance_server resource #2772

Closed
@gmalfray

Description

@gmalfray

Terraform Version

Terraform v1.9.7

Affected Resource(s)

  • scaleway_instance_server

Terraform Configuration Files

resource "scaleway_instance_server" "proxy" {
  type       = "DEV1-S"
  project_id = var.project_id
  count      = var.nbproxy
  name       = "${var.basename_proxy}${count.index + 1}${var.domain}"
  image      = "debian_bookworm"
  zone       = "fr-par-2"
  user_data = {
    cloud-init = data.template_file.userdataproxy.rendered
  }
  private_network {
    pn_id = data.scaleway_vpc_private_network.pvn-pra-plop.private_network_id
  }
}

Debug Output

"private_ip" = tostring(null)
"private_network" = tolist([
  {
    "mac_address" = "02:00:00:2f:c8:4f"
    "pn_id" = "fr-par/c079e90b-4b31-4e1a-9af7-7f6bcbb1d5fd"
    "pnic_id" = "bc2f70f6-68ac-498e-b6f8-f1dec36f62db"
    "status" = "available"
    "zone" = "fr-par"
  },
])

Expected Behavior

The private_ip field should return the private IP address of the instance once it is connected to the specified private network

Actual Behavior

The private_ip field is null in the output, even though the instance is successfully created and attached to the private network.

Steps to Reproduce

Define a scaleway_instance_server resource with a private network.
Run terraform apply.
Observe that the private_ip field in the output is null.

Additional Context

The Scaleway instance is being created in the fr-par-2 zone.
The issue occurs even though the instance is correctly attached to the private network, as indicated by the network.
A private IP address is indeed assigned to the resource.

References

No response

Metadata

Metadata

Assignees

Labels

documentationinstanceInstance issues, bugs and feature requestspriority:highestBugs filled by customers, security issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions