Skip to content

[Bug]: The provider is producing an inconsistent network configuration value that doesn't match the original plan #1088

Open
@mattbr0wn

Description

@mattbr0wn

What happened?

╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.master.hcloud_server.core[0] to include new values learned so far during apply, provider "registry.terraform.io/hetznercloud/hcloud"
│ produced an invalid new value for .network: actual set element cty.ObjectVal(map[string]cty.Value{"alias_ips":cty.UnknownVal(cty.Set(cty.String)),
│ "ip":cty.StringVal("10.0.1.2"), "mac_address":cty.UnknownVal(cty.String), "network_id":cty.NumberIntVal(1.0675277e+07)}) does not correlate with any element in plan.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

What did you expect to happen?

Consistency during apply

Please provide a minimal working example

Terraform will perform the following actions:

  # module.firewall.hcloud_firewall.nodes will be created
  + resource "hcloud_firewall" "nodes" {
      + id     = (known after apply)
      + labels = {
          + "environment" = "preview"
          + "managed_by"  = "terraform"
        }
      + name   = "preview-k8s-nodes-firewall"

      + apply_to {
          + label_selector = (known after apply)
          + server         = (known after apply)
        }
      + apply_to {
          + label_selector = (known after apply)
          + server         = (known after apply)
        }

      + rule {
          + destination_ips = []
          + direction       = "in"
          + port            = "10250"
          + protocol        = "tcp"
          + source_ips      = [
              + "10.0.0.0/16",
            ]
        }
      + rule {
          + destination_ips = []
          + direction       = "in"
          + port            = "22"
          + protocol        = "tcp"
          + source_ips      = (known after apply)
        }
      + rule {
          + destination_ips = []
          + direction       = "in"
          + port            = "2379-2380"
          + protocol        = "tcp"
          + source_ips      = [
              + "10.0.0.0/16",
            ]
        }
      + rule {
          + destination_ips = []
          + direction       = "in"
          + port            = "6443"
          + protocol        = "tcp"
          + source_ips      = [
              + "10.0.0.0/16",
            ]
        }
      + rule {
          + destination_ips = []
          + direction       = "in"
          + port            = "8472"
          + protocol        = "tcp"
          + source_ips      = [
              + "10.0.0.0/16",
            ]
        }
    }

  # module.jumpbox.hcloud_server.core[0] will be created
  + resource "hcloud_server" "core" {
      + allow_deprecated_images    = false
      + backup_window              = (known after apply)
      + backups                    = false
      + datacenter                 = (known after apply)
      + delete_protection          = false
      + firewall_ids               = (known after apply)
      + id                         = (known after apply)
      + ignore_remote_firewall_ids = false
      + image                      = "debian-12"
      + ipv4_address               = (known after apply)
      + ipv6_address               = (known after apply)
      + ipv6_network               = (known after apply)
      + keep_disk                  = false
      + labels                     = {
          + "environment" = "preview"
          + "managed_by"  = "terraform"
        }
      + location                   = "nbg1"
      + name                       = "preview-k8s-jump"
      + primary_disk_size          = (known after apply)
      + rebuild_protection         = false
      + server_type                = "cx22"
      + shutdown_before_deletion   = false
      + ssh_keys                   = (known after apply)
      + status                     = (known after apply)
    }

  # module.master.hcloud_server.core[0] will be created
  + resource "hcloud_server" "core" {
      + allow_deprecated_images    = false
      + backup_window              = (known after apply)
      + backups                    = false
      + datacenter                 = (known after apply)
      + delete_protection          = false
      + firewall_ids               = (known after apply)
      + id                         = (known after apply)
      + ignore_remote_firewall_ids = false
      + image                      = "debian-12"
      + ipv4_address               = (known after apply)
      + ipv6_address               = (known after apply)
      + ipv6_network               = (known after apply)
      + keep_disk                  = false
      + labels                     = {
          + "environment" = "preview"
          + "managed_by"  = "terraform"
        }
      + location                   = "nbg1"
      + name                       = "preview-k8s-master"
      + primary_disk_size          = (known after apply)
      + rebuild_protection         = false
      + server_type                = "cx22"
      + shutdown_before_deletion   = false
      + ssh_keys                   = (known after apply)
      + status                     = (known after apply)
    }

  # module.network.hcloud_network.k8s will be created
  + resource "hcloud_network" "k8s" {
      + delete_protection        = false
      + expose_routes_to_vswitch = false
      + id                       = (known after apply)
      + ip_range                 = "10.0.0.0/16"
      + labels                   = {
          + "environment" = "preview"
          + "managed_by"  = "terraform"
        }
      + name                     = "preview-k8s-network"
    }

  # module.network.hcloud_network_subnet.k8s will be created
  + resource "hcloud_network_subnet" "k8s" {
      + gateway      = (known after apply)
      + id           = (known after apply)
      + ip_range     = "10.0.1.0/24"
      + network_id   = (known after apply)
      + network_zone = "eu-central"
      + type         = "cloud"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions