-
Notifications
You must be signed in to change notification settings - Fork 108
Implemented Private Image Sharing features #2129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Private Image Sharing features #2129
Conversation
* 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>
139711a to
920e625
Compare
37a1f94 to
e44d976
Compare
8962bd3 to
f041149
Compare
…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
24faefc to
277bdbf
Compare
e7481b0 to
6aeaa0d
Compare
…areGroupMember resources
6aeaa0d to
a95fe04
Compare
cbc4367 to
a14842c
Compare
a14842c to
8ffc85f
Compare
There was a problem hiding this 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.
87333f7 to
474dab1
Compare
There was a problem hiding this 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.
lgarber-akamai
left a comment
There was a problem hiding this 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!
yec-akamai
left a comment
There was a problem hiding this 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:
f343d2e
into
linode:proj/private-image-sharing
* 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>
📝 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_TOKENandLINODE_CONSUMER_TOKENenvironment variables (pointing at two different accounts), as some features require multiple accounts to test.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-unitIntegration 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):
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:
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.