Skip to content

Conversation

@zliang-akamai
Copy link
Member

@zliang-akamai zliang-akamai commented Jul 14, 2025

Merge from project branch to dev. This is basically same as #337, which has been reviewed and approved

Testing

go test ./builder/linode -run TestBuilderPrepare_LinodeNetworkInterfaces

Put this content in a file called test.pkr.hcl

locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }

source "linode" "example" {
  image             = "linode/ubuntu24.04"
  image_description = "My Private Image"
  image_label       = "private-image-${local.timestamp}"
  instance_label    = "temporary-linode-${local.timestamp}"
  instance_type     = "g6-standard-1"
  region            = "us-mia"
  ssh_username      = "root"
  interface_generation = "linode"

  linode_interface {
    firewall_id = 2930969 // this firewall must allow SSH from your IP otherwise Packer won't be able to connect to it
    public {
    }
  }
}

build {
  sources = ["source.linode.example"]
}

Than run:

make dev
packer build .

* Add support for Linode Interfaces

* Add Linode Interface example

* Address comments
@zliang-akamai zliang-akamai requested a review from a team as a code owner July 14, 2025 17:38
@zliang-akamai zliang-akamai requested review from yec-akamai and ykim-akamai and removed request for a team July 14, 2025 17:38
@zliang-akamai zliang-akamai changed the title Add support for Linode Interfaces (#337) Add support for Linode Interfaces Jul 14, 2025
@zliang-akamai zliang-akamai marked this pull request as draft July 14, 2025 17:41
@ykim-akamai ykim-akamai removed their request for review July 18, 2025 21:46
@zliang-akamai zliang-akamai marked this pull request as ready for review November 13, 2025 23:34
@zliang-akamai zliang-akamai requested review from a team, Copilot, ezilber-akamai and vshanthe and removed request for a team November 13, 2025 23:34
Copy link

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 newer Linode network interfaces alongside the existing legacy config interfaces. The implementation introduces a new linode_interface configuration block with comprehensive support for public, VPC, and VLAN interface types, while maintaining backward compatibility with the existing interface configuration.

Key Changes:

  • Added new LinodeInterface struct and related types for public, VPC, and VLAN interface configurations
  • Implemented interface generation selection via interface_generation field
  • Added flattening functions to convert Packer configuration to Linode API options

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
builder/linode/linode_interfaces.go Defines new interface configuration structures for Linode networking
builder/linode/linode_interfaces.hcl2spec.go Auto-generated HCL2 specification for new interface types
builder/linode/step_create_linode.go Implements flattening logic and updates instance creation to support both interface types
builder/linode/config.go Adds LinodeInterfaces and InterfaceGeneration configuration fields
builder/linode/config.hcl2spec.go Updates HCL2 spec to include new configuration fields
builder/linode/builder_test.go Adds comprehensive tests for Linode interface configuration
docs/builders/linode.mdx Documents new interface configuration options with examples
.web-docs/components/builder/linode/README.md Updates generated documentation for new interface support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zliang-akamai zliang-akamai added the project for new projects in the changelog. label Dec 9, 2025
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Nice work! 🎉

@ezilber-akamai ezilber-akamai merged commit 7917e31 into dev Dec 9, 2025
12 checks passed
@ezilber-akamai ezilber-akamai deleted the proj/linode-interfaces branch December 9, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants