Skip to content

VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource#2096

Merged
lgarber-akamai merged 7 commits intolinode:devfrom
lgarber-akamai:new/linode-interfaces-vpc-dual-stack
Oct 22, 2025
Merged

VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource#2096
lgarber-akamai merged 7 commits intolinode:devfrom
lgarber-akamai:new/linode-interfaces-vpc-dual-stack

Conversation

@lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Sep 29, 2025

📝 Description

This pull request adds support for Dual Stack VPC Linode Interfaces in the linode_interface resource.

Depends on #2087

✔️ How to Test

The following test steps assume you have pulled down this PR locally and are pointing at a Linode account that has access to VPC Dual Stack and Linode Interfaces. See TPT-3535 for more details.

Integration Testing

make PKG_NAME=linodeinterface test-int

Manual Testing

  1. In a terraform-provider-linode sandbox environment, apply the following configuration:
provider "linode" {
  api_version="v4beta"
}

resource "linode_interface" "vpc" {
  linode_id = linode_instance.test.id

  vpc = {
    subnet_id = linode_vpc_subnet.test.id
    ipv6 = {
      is_public = true

      slaac = [
        {
          range = "auto"
        }
      ]

      ranges = [
        {
          range = "auto"
        }
      ]
    }
  }
}

resource "linode_instance" "test" {
  label = "tf-test-manual"
  region = "no-osl-1"
  type = "g6-nanode-1"
  interface_generation = "linode"
}

resource "linode_vpc" "test" {
  label = "tf-test-manual"
  region = "no-osl-1"
  ipv6 = [
    {
      range = "auto"
    }
  ]
}

resource "linode_vpc_subnet" "test" {
  vpc_id = linode_vpc.test.id
  label = "tf-test-manual"
  ipv4 = "10.0.0.0/24"
  ipv6 = [
    {
      range = "auto"
    }
  ]
}

resource "linode_instance_config" "my-config" {
  linode_id = linode_instance.test.id
  label = "tf-test-manual"

  device {
    device_name = "sda"
    disk_id = linode_instance_disk.boot.id
  }

  booted = false
}

resource "linode_instance_disk" "boot" {
  label = "boot"
  linode_id = linode_instance.test.id
  size = linode_instance.test.specs.0.disk

  image = "linode/alpine3.21"
  root_pass = "myc00lp4xssadass!!!!!!!"
}
  1. Make arbitrary updates to the interface's IPv6 configuration.
  2. Re-apply the configuration and ensure it updates successfully.
  3. Plan the configuration and ensure no changes are proposed.

@lgarber-akamai lgarber-akamai added new-feature for new features in the changelog. breaking-change for breaking changes in the changelog. labels Sep 29, 2025
@lgarber-akamai lgarber-akamai marked this pull request as ready for review September 29, 2025 20:53
@lgarber-akamai lgarber-akamai requested a review from a team as a code owner September 29, 2025 20:53
@lgarber-akamai lgarber-akamai requested review from jriddle-linode and zliang-akamai and removed request for a team September 29, 2025 20:53
@lgarber-akamai lgarber-akamai added do-not-merge PRs that should not be merged until the commented issue is resolved and removed breaking-change for breaking changes in the changelog. labels Oct 7, 2025
@lgarber-akamai lgarber-akamai marked this pull request as draft October 9, 2025 16:52
@lgarber-akamai lgarber-akamai force-pushed the new/linode-interfaces-vpc-dual-stack branch from 435eaa2 to 892def6 Compare October 9, 2025 16:57
@lgarber-akamai lgarber-akamai requested review from Copilot and removed request for jriddle-linode and zliang-akamai October 9, 2025 17:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for IPv6 VPC Linode Interfaces in the linode_interface resource, implementing Dual Stack VPC functionality. This enhancement allows users to configure IPv6 addresses through SLAAC and static ranges on VPC interfaces.

  • Adds IPv6 configuration support to VPC interfaces with SLAAC and range options
  • Introduces comprehensive test coverage for IPv6 VPC interface functionality
  • Updates documentation with IPv6 configuration examples and reference material

Reviewed Changes

Copilot reviewed 15 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
linode/vpcips/framework_models.go Refactored ConfigID handling logic
linode/nb/tmpl/vpc.gotf Added IPv6 configuration to VPC and subnet templates
linode/linodeinterface/tmpl/ New test templates for IPv6 VPC interface configurations
linode/linodeinterface/framework_vpc_models.go Added IPv6 data models and processing logic for VPC interfaces
linode/linodeinterface/framework_resource_test.go New integration test for IPv6 VPC interface functionality
linode/linodeinterface/framework_resource_schema.go Added IPv6 schema attributes for VPC interfaces
linode/linodeinterface/framework_resource.go Minor logging attribute reordering
linode/linodeinterface/framework_models.go Updated interface flattening to handle IPv6 null objects
docs/ Updated documentation with IPv6 configuration examples and reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lgarber-akamai lgarber-akamai changed the title VPC Dual Stack: Add support for IPv6 VPC Linode Interfaces VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource" Oct 13, 2025
@lgarber-akamai lgarber-akamai removed the do-not-merge PRs that should not be merged until the commented issue is resolved label Oct 13, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 15 out of 19 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lgarber-akamai lgarber-akamai changed the title VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource" VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource Oct 13, 2025
@lgarber-akamai lgarber-akamai added the do-not-merge PRs that should not be merged until the commented issue is resolved label Oct 13, 2025
@lgarber-akamai lgarber-akamai marked this pull request as ready for review October 13, 2025 18:13
@lgarber-akamai lgarber-akamai force-pushed the new/linode-interfaces-vpc-dual-stack branch from 32fabff to 59452f6 Compare October 13, 2025 18:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 15 out of 19 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 15 out of 19 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lgarber-akamai lgarber-akamai changed the base branch from proj/linode-interfaces to dev October 16, 2025 17:46
@lgarber-akamai lgarber-akamai changed the base branch from dev to proj/linode-interfaces October 16, 2025 17:46
@lgarber-akamai lgarber-akamai force-pushed the new/linode-interfaces-vpc-dual-stack branch from 8eee9b0 to b3e43ba Compare October 16, 2025 18:25
@lgarber-akamai lgarber-akamai changed the base branch from proj/linode-interfaces to dev October 16, 2025 18:26
@lgarber-akamai lgarber-akamai requested review from a team, vshanthe and zliang-akamai and removed request for a team October 16, 2025 18:27
@lgarber-akamai lgarber-akamai removed the do-not-merge PRs that should not be merged until the commented issue is resolved label Oct 16, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 18 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

lgarber-akamai and others added 2 commits October 16, 2025 14:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 18 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lgarber-akamai lgarber-akamai requested review from a team, ezilber-akamai and zliang-akamai and removed request for a team October 21, 2025 15:35
@lgarber-akamai lgarber-akamai merged commit 205a9d5 into linode:dev Oct 22, 2025
9 checks passed
ezilber-akamai added a commit that referenced this pull request Nov 13, 2025
* Added new fields to image/images datasources and resource

* Project: Linode Interfaces (#1862)

* Replace linodego with the feature branch version of it

* Add `interfaces_for_new_linodes` attribute in account setting resource and data source (#1864)

* Sync linodego feature branch

* Support `config_id` in the linode interfaces in subnet resources and data sources (#1896)

* Support `config_id` in the interfaces of linodes in subnet resources and data sources

* Add helper func for ptr conversion

* Implement firewall template and templates data sources (#1873)

* sync with linodego feature branch

* Linode Interfaces: Implement changes under linode_instance resource and data source (#1890)

* Linode Interfaces: Add non-interface /linode/instances fields

* WIP

* Drop validation and add partial docs

* Fix up docs

* Sort imports

* Update replacement

* oops

* remove TODO

* Minor docs change

* Revert replace

* ADd TODO

* Remove trailing space

* Add interface_id in networking IP data sources (#1898)

* Add interface_id in various networking IP data sources

* Fix test

* Update docs

* Update VPC and account setting docs (#1903)

* Update VPC and account setting docs

* Fix descriptions in schema

* sync with linodego feature branch

* Implement firewall settings data source (#1905)

* Implement firewall settings data source

* gofumpt

* Add test

* Fix

* Upgrade some tests to be with protocol v6 factory

* Add support for interfaces in firewall resource and data source (#1899)

* Add support for interfaces in firewall resource and data source

* Add unit test

* Add TODO for acceptance tests

* Update docs

* Add interfaces support in firewalls data source (#1902)

* Add interfaces support in firewalls data source

* Update and migrate tests

* Update doc

* Migrate to firewall settings data source to be with nested object (#1947)

* golangci-lint run --fix && golangci-lint fmt

* Sync linodego version

* Set config_id to null attribute when it's Go zero value (#1953)

Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>

* Implement firewall settings resource (#1963)

* Implementation and tests for linode_firewall_settings resource

* Add doc

* Remove ID referencing

* Fix doc

* Add tag for integration test

* Fix

* golangci-lint fmt

* Cleanup

* Fix nil pointer panic

* Sync linodego

* Sync linodego feature branch

* go mod tidy

* golangci-lint fmt

* Repin linodego to released version

* Fix

* Add nested object update helper (#2002)

* Implement nested object update helper

* Add isNull return (pass by ptr)

* FIx

* Minor change

* Implement linode interface resource (#2087)

* Implement linode interface resource

* Cleanup boolTrue and boolFalse

* Cleanup debugging stuff

* cleanup

* golangci-lint fmt

* Adjust importing IDs order

* Remove redundant

* Improved doc

* improved test

* Fix lint

* Copilot fixed doc

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode/firewall/framework_models.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode/firewalltemplates/tmpl/data_filter.gotf

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/data-sources/vpc_subnets.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/data-sources/vpc_subnet.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode/firewallsettings/framework_resource.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com>
Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Added datasource/resource for Image Share Group

* Normalize null value for Images to [] for consistent behavior

* Add logging for Linode interface resource (#2132)

* Add 30s waiting period for OBJ temp key for E2/3 endpoints; update docs (#2133)

* Added Image Share Groups datasource and Image Share Group Member resource

* Added datasource for Image Shares

* VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource (#2096)

* VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource

* fix ordering

* Update docs/data-sources/vpc_subnets.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/data-sources/vpc_subnet.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add validation to VPC and Subnet creation to prevent unexpected errors without VPC IPv6 enrollment

* minor rework

* oops

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unnecessary sweep function (#2135)

* Add ID for firewall setting resource and data source (#2136)

* Add ID for firewall setting resource and data source

* go mod tidy

* Added Image Share Group Token resource

* Add Linode interface related packages to the integration test CI (#2138)

* Added docs and integration tests for ImageShareGroupToken and ImageShareGroupMember resources

* Added Image Share Group Member datasource

* Added ImageShareGroupMembers datasource

* Added ImageShareGroupToken datasource

* Added ImageShareGroupTokens datasource

* Added datasource for Consumer Image Share Group

* Added ConsumerImageShareGroupImageShares datasource

* Point to more recent linodego commit

* Fixes

* Added LA notices to docs

* Added documentation links

* Point at latest linodego release

* Added new tokens to integration_tests.yml

* Added new tokens to integration_tests_pr.yml

* Fix test

* Addressed PR comments

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com>
Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ezilber-akamai added a commit that referenced this pull request Nov 14, 2025
* Implemented Private Image Sharing features (#2129)

* Added new fields to image/images datasources and resource

* Project: Linode Interfaces (#1862)

* Replace linodego with the feature branch version of it

* Add `interfaces_for_new_linodes` attribute in account setting resource and data source (#1864)

* Sync linodego feature branch

* Support `config_id` in the linode interfaces in subnet resources and data sources (#1896)

* Support `config_id` in the interfaces of linodes in subnet resources and data sources

* Add helper func for ptr conversion

* Implement firewall template and templates data sources (#1873)

* sync with linodego feature branch

* Linode Interfaces: Implement changes under linode_instance resource and data source (#1890)

* Linode Interfaces: Add non-interface /linode/instances fields

* WIP

* Drop validation and add partial docs

* Fix up docs

* Sort imports

* Update replacement

* oops

* remove TODO

* Minor docs change

* Revert replace

* ADd TODO

* Remove trailing space

* Add interface_id in networking IP data sources (#1898)

* Add interface_id in various networking IP data sources

* Fix test

* Update docs

* Update VPC and account setting docs (#1903)

* Update VPC and account setting docs

* Fix descriptions in schema

* sync with linodego feature branch

* Implement firewall settings data source (#1905)

* Implement firewall settings data source

* gofumpt

* Add test

* Fix

* Upgrade some tests to be with protocol v6 factory

* Add support for interfaces in firewall resource and data source (#1899)

* Add support for interfaces in firewall resource and data source

* Add unit test

* Add TODO for acceptance tests

* Update docs

* Add interfaces support in firewalls data source (#1902)

* Add interfaces support in firewalls data source

* Update and migrate tests

* Update doc

* Migrate to firewall settings data source to be with nested object (#1947)

* golangci-lint run --fix && golangci-lint fmt

* Sync linodego version

* Set config_id to null attribute when it's Go zero value (#1953)

Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>

* Implement firewall settings resource (#1963)

* Implementation and tests for linode_firewall_settings resource

* Add doc

* Remove ID referencing

* Fix doc

* Add tag for integration test

* Fix

* golangci-lint fmt

* Cleanup

* Fix nil pointer panic

* Sync linodego

* Sync linodego feature branch

* go mod tidy

* golangci-lint fmt

* Repin linodego to released version

* Fix

* Add nested object update helper (#2002)

* Implement nested object update helper

* Add isNull return (pass by ptr)

* FIx

* Minor change

* Implement linode interface resource (#2087)

* Implement linode interface resource

* Cleanup boolTrue and boolFalse

* Cleanup debugging stuff

* cleanup

* golangci-lint fmt

* Adjust importing IDs order

* Remove redundant

* Improved doc

* improved test

* Fix lint

* Copilot fixed doc

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode/firewall/framework_models.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode/firewalltemplates/tmpl/data_filter.gotf

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/data-sources/vpc_subnets.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/data-sources/vpc_subnet.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update linode/firewallsettings/framework_resource.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com>
Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Added datasource/resource for Image Share Group

* Normalize null value for Images to [] for consistent behavior

* Add logging for Linode interface resource (#2132)

* Add 30s waiting period for OBJ temp key for E2/3 endpoints; update docs (#2133)

* Added Image Share Groups datasource and Image Share Group Member resource

* Added datasource for Image Shares

* VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource (#2096)

* VPC Dual Stack: Add support for IPv6 VPC in linode_interface resource

* fix ordering

* Update docs/data-sources/vpc_subnets.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/data-sources/vpc_subnet.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add validation to VPC and Subnet creation to prevent unexpected errors without VPC IPv6 enrollment

* minor rework

* oops

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unnecessary sweep function (#2135)

* Add ID for firewall setting resource and data source (#2136)

* Add ID for firewall setting resource and data source

* go mod tidy

* Added Image Share Group Token resource

* Add Linode interface related packages to the integration test CI (#2138)

* Added docs and integration tests for ImageShareGroupToken and ImageShareGroupMember resources

* Added Image Share Group Member datasource

* Added ImageShareGroupMembers datasource

* Added ImageShareGroupToken datasource

* Added ImageShareGroupTokens datasource

* Added datasource for Consumer Image Share Group

* Added ConsumerImageShareGroupImageShares datasource

* Point to more recent linodego commit

* Fixes

* Added LA notices to docs

* Added documentation links

* Point at latest linodego release

* Added new tokens to integration_tests.yml

* Added new tokens to integration_tests_pr.yml

* Fix test

* Addressed PR comments

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com>
Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Ran go mod tidy

* Fixed filtering for image share group members

---------

Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
Co-authored-by: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com>
Co-authored-by: Ye Chen <127243817+yec-akamai@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants