Skip to content

resource(vpc_firewall_rules): provider produced invalid plan #453

@sudomateo

Description

@sudomateo

A customer reported that the following Terraform configuration resulted in an error when running Terraform v1.5.0 and provider version v0.10.0.

resource "oxide_vpc_firewall_rules" "default_rules" {
  vpc_id = data.oxide_vpc.default_vpc.id
  rules = toset([
    {
      action      = "allow"
      description = "Allow HTTPS."
      name        = "allow-https"
      direction   = "inbound"
      priority    = 50
      status      = "enabled"
      filters = {
        hosts = [
          {
            type  = "vpc"
            value = "default"
          }
        ]
        ports     = ["443"]
        protocols = ["TCP"]
      },
      targets = [
        {
          type  = "subnet"
          value = "default"
        }
      ]
    },
    {
      action      = "allow"
      description = "Allow SSH."
      name        = "allow-ssh"
      direction   = "inbound"
      priority    = 50
      status      = "enabled"
      filters = {
        hosts = [
          {
            type  = "vpc"
            value = "default"
          }
        ]
        ports     = ["22"]
        protocols = ["TCP"]
      },
      targets = [
        {
          type  = "subnet"
          value = "default"
        }
      ]
    }
  ])
}
Error: Provider produced invalid plan

Provider "registry.terraform.io/oxidecomputer/oxide" planned an invalid value
for
module.oxide_host["dc15-testl1"].oxide_vpc_firewall_rules.default_rules.rules:
count in plan (cty.UnknownVal(cty.Number)) disagrees with count in config
(cty.NumberIntVal(2)).

This is a bug in the provider, which should be reported in the provider's own
issue tracker.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions