Skip to content

Set integer fields as pointers#274

Merged
karencfv merged 2 commits intooxidecomputer:mainfrom
karencfv:integers-as-pointers
Mar 28, 2025
Merged

Set integer fields as pointers#274
karencfv merged 2 commits intooxidecomputer:mainfrom
karencfv:integers-as-pointers

Conversation

@karencfv
Copy link
Collaborator

@karencfv karencfv commented Mar 28, 2025

I've additionally manually tested by updating the terraform provider locally and running all acceptance tests and with the following terraform config:

terraform {
  required_version = ">= 1.0"

  required_providers {
    oxide = {
      source  = "oxidecomputer/oxide"
      version = "0.8.0-dev"
    }
  }
}

resource "oxide_vpc_firewall_rules" "talos_k8s_nodeports" {
  vpc_id = "8c2757bc-1cea-422c-ba66-e330bfbcaf92"
  rules = [
    {
      name        = "talos-k8s-nodeports"
      description = "Talos Kubernetes node ports."
      action      = "allow"
      direction   = "inbound"
      priority    = 0
      status      = "enabled"
      filters = {
        ports     = ["30000-32767"]
        protocols = ["TCP"]
      },
      targets = [
        {
          type  = "vpc"
          value = "dud"
        }
      ]
    }
  ]
}
$ terraform apply
<...>

Terraform used the selected providers to generate the following execution plan. Resource actions
are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # oxide_vpc_firewall_rules.talos_k8s_nodeports will be created
  + resource "oxide_vpc_firewall_rules" "talos_k8s_nodeports" {
      + id     = (known after apply)
      + rules  = [
          + {
              + action        = "allow"
              + description   = "Talos Kubernetes node ports."
              + direction     = "inbound"
              + filters       = {
                  + ports     = [
                      + "30000-32767",
                    ]
                  + protocols = [
                      + "TCP",
                    ]
                }
              + id            = (known after apply)
              + name          = "talos-k8s-nodeports"
              + priority      = 0
              + status        = "enabled"
              + targets       = [
                  + {
                      + type  = "vpc"
                      + value = "dud"
                    },
                ]
              + time_created  = (known after apply)
              + time_modified = (known after apply)
            },
        ]
      + vpc_id = "8c2757bc-1cea-422c-ba66-e330bfbcaf92"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

oxide_vpc_firewall_rules.talos_k8s_nodeports: Creating...
oxide_vpc_firewall_rules.talos_k8s_nodeports: Creation complete after 0s [id=076a749e-7876-45f1-85dc-fd1bf01ea5a8]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Closes: #273 #245 oxidecomputer/terraform-provider-oxide#403

Copy link
Collaborator

@sudomateo sudomateo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good! Thanks for working on this.

@karencfv karencfv merged commit c8be658 into oxidecomputer:main Mar 28, 2025
1 check passed
@karencfv karencfv deleted the integers-as-pointers branch March 28, 2025 23:18
karencfv added a commit to oxidecomputer/terraform-provider-oxide that referenced this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Required offset field is omitted when 0

2 participants