Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Private network not included on server data source #1048

Open
inakimalerba opened this issue Nov 21, 2024 · 0 comments
Open

[Bug]: Private network not included on server data source #1048

inakimalerba opened this issue Nov 21, 2024 · 0 comments
Labels

Comments

@inakimalerba
Copy link

What happened?

When trying to fetch information about an existing server, for example, by using the following query, the resulting objects do not contain information about the private networks.

data "hcloud_servers" "masters" {
  with_selector = "role=master"
}

I think the issue is on this check, which apparently does not work when we're fetching the server information:

Also, the data schema does not contain a network field.

What did you expect to happen?

Be able to get the value of the private IP of a VM.

Please provide a minimal working example

data "hcloud_servers" "masters" {
  with_selector = "role=master"
}

output "masters" {
  value = data.hcloud_server.masters
}

output is

   masters = {
       id            = "redacted"
       servers       = [
           {
               backup_window      = ""
               backups            = false
               datacenter         = "nbg1-dc3"
               delete_protection  = false
               firewall_ids       = []
               id                 = redacted
               image              = "debian-12"
               ipv4_address       = ""
               ipv6_address       = ""
               ipv6_network       = "<nil>"
               iso                = ""
               labels             = {
                   cluster = "staging"
                   role    = "master"
                }
               location           = "nbg1"
               name               = "staging-master1"
               network            = []
               placement_group_id = redacted
               primary_disk_size  = 80
               rebuild_protection = false
               rescue             = ""
               server_type        = "cpx21"
               status             = "running"
            },
            ...
``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant