Skip to content

Conversation

@ezilber-akamai
Copy link
Contributor

@ezilber-akamai ezilber-akamai commented Oct 14, 2025

📝 Description

Implements support for Private Image Sharing.

✔️ How to Test

The following test steps assume you have pulled down this PR locally. Note that several integration tests will be skipped unless you set the LINODE_PRODUCER_TOKEN and LINODE_CONSUMER_TOKEN environment variables (pointing at two different accounts), as some features require multiple accounts to test.

NOTE: There are some known filtering issues in the API that will cause test failures for the following tests:

  • make test-int PKG_NAME="images" TEST_CASE="TestAccDataSourceImages_basic_smoke"
  • make test-int PKG_NAME="producerimagesharegroupmembers" TEST_CASE="TestAccDataSourceImageShareGroupMembers_basic"

Unit Testing

  • make test-unit

Integration Testing

  • make test-int PKG_NAME="image" TEST_CASE="TestAccDataSourceImage_basic"
  • make test-int PKG_NAME="image" TEST_CASE="TestAccImage_basic"
  • make test-int PKG_NAME="images" TEST_CASE="TestAccDataSourceImages_basic_smoke"
  • make test-int PKG_NAME="producerimagesharegroup" TEST_CASE="TestAccDataSourceImageShareGroup_basic"
  • make test-int PKG_NAME="producerimagesharegroup" TEST_CASE="TestAccResourceImageShareGroup_basic"
  • make test-int PKG_NAME="producerimagesharegroup" TEST_CASE="TestAccResourceImageShareGroup_updates"
  • make test-int PKG_NAME="producerimagesharegroups" TEST_CASE="TestAccDataSourceImageShareGroups_basic"
  • make test-int PKG_NAME="producerimagesharegroupimageshares" TEST_CASE="TestAccDataSourceImageShareGroupImageShares_basic"
  • make test-int PKG_NAME="consumerimagesharegrouptoken" TEST_CASE="TestAccResourceImageShareGroupToken_basic"
  • make test-int PKG_NAME="producerimagesharegroupmember" TEST_CASE="TestAccResourceImageShareGroupMember_basic"
  • make test-int PKG_NAME="producerimagesharegroupmember" TEST_CASE="TestAccDataSourceImageShareGroupMember_basic"
  • make test-int PKG_NAME="producerimagesharegroupmembers" TEST_CASE="TestAccDataSourceImageShareGroupMembers_basic"
  • make test-int PKG_NAME="consumerimagesharegrouptoken" TEST_CASE="TestAccDataSourceImageShareGroupToken_basic"
  • make test-int PKG_NAME="consumerimagesharegrouptokens" TEST_CASE="TestAccDataSourceImageShareGroupTokens_basic"
  • make test-int PKG_NAME="consumerimagesharegroup" TEST_CASE="TestAccDataSourceConsumerImageShareGroup_basic"
  • make test-int PKG_NAME="consumerimagesharegroupimageshares" TEST_CASE="TestAccDataSourceImageShareGroupImageShares_basic"

Manual Testing

Export the following environment variables (you will need two separate accounts to test all the features in this PR):

export TF_VAR_producer_token=$LINODE_PRODUCER_TOKEN
export TF_VAR_consumer_token=$LINODE_CONSUMER_TOKEN

To simplify what will already be a long and complex TF config, I recommend creating a small Linode Instance and one or two Images pointing at it manually in CM. You will then be able to simple use the Image's IDs in the config, which should speed up how quickly the config runs. This should be done on the account that will serve as the Producer.

When the Linode Instance and Images have been created, run the following config:

variable "producer_token" {
  description = "API token for the producer account"
  type        = string
}

variable "consumer_token" {
  description = "API token for the consumer account"
  type        = string
}

provider "linode" {
  alias = "producer"
  token = var.producer_token
  api_version = "v4beta"
}

provider "linode" {
  alias = "consumer"
  token = var.consumer_token
  api_version = "v4beta"
}

# Create the Share Group on the Producer account
resource "linode_producer_image_share_group" "sharegroup" {
  provider    = linode.producer
  label  = "test-label"
  description = "Example description."
  images = [
    {
        id = <id-of-image>
        description = "Image description."
        label = "image-label"
    },
}

# Create the Share Group Token on the Consumer account
resource "linode_consumer_image_share_group_token" "token" {
  provider                 = linode.consumer
  depends_on               = [linode_producer_image_share_group.sharegroup]
  valid_for_sharegroup_uuid = linode_producer_image_share_group.sharegroup.uuid
}

# Create the Share Group Member on the Producer account
resource "linode_producer_image_share_group_member" "member" {
  provider        = linode.producer
  depends_on      = [linode_consumer_image_share_group_token.token]
  sharegroup_id   = linode_producer_image_share_group.sharegroup.id
  token  = linode_consumer_image_share_group_token.token.token
  label = "test-member"
}

The config above will allow you to create/update the three new resources added in this PR. There are also several datasources that can be used to view data associated with the resources created above.

@ezilber-akamai ezilber-akamai added the new-feature for new features in the changelog. label Oct 14, 2025
zliang-akamai and others added 2 commits October 15, 2025 18:10
* Replace linodego with the feature branch version of it

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

* Sync linodego feature branch

* Support `config_id` in the linode interfaces in subnet resources and data sources (linode#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 (linode#1873)

* sync with linodego feature branch

* Linode Interfaces: Implement changes under linode_instance resource and data source (linode#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 (linode#1898)

* Add interface_id in various networking IP data sources

* Fix test

* Update docs

* Update VPC and account setting docs (linode#1903)

* Update VPC and account setting docs

* Fix descriptions in schema

* sync with linodego feature branch

* Implement firewall settings data source (linode#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 (linode#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 (linode#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 (linode#1947)

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

* Sync linodego version

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

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

* Implement firewall settings resource (linode#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 (linode#2002)

* Implement nested object update helper

* Add isNull return (pass by ptr)

* FIx

* Minor change

* Implement linode interface resource (linode#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>
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from 139711a to 920e625 Compare October 16, 2025 18:28
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from 37a1f94 to e44d976 Compare October 16, 2025 20:00
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from 8962bd3 to f041149 Compare October 22, 2025 18:27
lgarber-akamai and others added 4 commits October 22, 2025 14:33
…linode#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>
* Add ID for firewall setting resource and data source

* go mod tidy
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from 24faefc to 277bdbf Compare October 23, 2025 20:07
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from e7481b0 to 6aeaa0d Compare October 27, 2025 15:13
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from 6aeaa0d to a95fe04 Compare October 27, 2025 17:48
@ezilber-akamai ezilber-akamai changed the base branch from dev to proj/private-image-sharing October 28, 2025 14:41
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from cbc4367 to a14842c Compare November 3, 2025 18:56
@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from a14842c to 8ffc85f Compare November 3, 2025 18:57
@ezilber-akamai ezilber-akamai marked this pull request as ready for review November 3, 2025 19:14
@ezilber-akamai ezilber-akamai requested a review from a team as a code owner November 3, 2025 19:14
@ezilber-akamai ezilber-akamai requested review from Copilot, jriddle-linode and lgarber-akamai and removed request for a team November 3, 2025 19:14
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 implements comprehensive support for private image sharing features, including new resources and data sources for producer image share groups, image share group members, consumer image share group tokens, and image shares. Additionally, it adds support for Linode Interfaces, VPC IPv6 functionality, network helper configuration, and enhanced object storage handling.

Key changes include:

  • Addition of private image sharing resources and data sources with proper testing and templates
  • Implementation of Linode Interface resource with support for public, VLAN, and VPC interface types
  • Enhancement of VPC and VPC subnet resources to support IPv6 configuration
  • Improvements to object storage temporary key handling for different endpoint types

Reviewed Changes

Copilot reviewed 227 out of 228 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
linode/producerimagesharegroup/ New producer image share group resource and data source implementation
linode/producerimagesharegroupmembers/ Data source for listing image share group members
linode/producerimagesharegroupmember/ Resource and data source for managing individual members
linode/producerimagesharegroupimageshares/ Data source for listing image shares within share groups
linode/consumerimagesharegrouptoken/ Consumer-side token management (referenced but not in diff)
linode/linodeinterface/ Complete implementation of Linode Interface resource
linode/vpcsubnet/ Enhanced VPC subnet support with IPv6 validation
linode/vpc/ Enhanced VPC resource with IPv6 validation
linode/instance/ Added interface_generation and network_helper support
linode/obj/ Improved object storage key handling for different endpoint types
linode/networkingip/ Added interface_id field to networking IP data sources

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

@ezilber-akamai ezilber-akamai force-pushed the TPT-3821-private-image-sharing branch from 87333f7 to 474dab1 Compare November 4, 2025 16:32
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 227 out of 228 changed files in this pull request and generated no new comments.


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

Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Looks great and all tests are passing on my end (- expected failures). Nice work!

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.

Test passed as expected! Just some small suggestions:

@ezilber-akamai ezilber-akamai merged commit f343d2e into linode:proj/private-image-sharing Nov 13, 2025
9 checks passed
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.

4 participants