Skip to content

TPT-4293: terraform: Implement linode_reserved_ip_types data source#2322

Merged
mgwoj merged 11 commits into
linode:proj/reserved-ipsfrom
mgwoj:feature/TPT-4293-terraform-implement-linode_reserved_ip_types-data-source
May 11, 2026
Merged

TPT-4293: terraform: Implement linode_reserved_ip_types data source#2322
mgwoj merged 11 commits into
linode:proj/reserved-ipsfrom
mgwoj:feature/TPT-4293-terraform-implement-linode_reserved_ip_types-data-source

Conversation

@mgwoj
Copy link
Copy Markdown
Contributor

@mgwoj mgwoj commented Apr 1, 2026

📝 Description

Implement a new Terraform data source linode_reserved_ip_types that returns pricing and type information for reserved IPv4 addresses. This endpoint is publicly accessible and does not require authentication.

✔️ How to Test

make test-int PKG_NAME="reservediptypes" TEST_CASE="TestAccDataSourceReservedIPTypes_basic"

@mgwoj mgwoj requested a review from Copilot April 1, 2026 09:52
@mgwoj mgwoj requested review from a team as code owners April 1, 2026 09:52
@mgwoj mgwoj added the new-feature for new features in the changelog. label Apr 1, 2026
@mgwoj mgwoj requested review from dawiddzhafarov and psnoch-akamai and removed request for a team April 1, 2026 09:52
Copy link
Copy Markdown
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

Adds a new Terraform Plugin Framework data source linode_reserved_ip_types intended to surface pricing/type information for reserved IPv4 addresses from the Linode API.

Changes:

  • Introduces the reserved IP types data source implementation (schema, models, read/list logic).
  • Adds acceptance-test template scaffolding for the data source.
  • Adds an integration test for basic state shape/values.

Reviewed changes

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

Show a summary per file
File Description
linode/reservediptypes/framework_datasource.go Implements the linode_reserved_ip_types data source read path and API listing function.
linode/reservediptypes/framework_datasource_schema.go Defines schema (filter/order + returned types list with pricing fields).
linode/reservediptypes/framework_models.go Adds TF framework models and API-to-state flattening helpers.
linode/reservediptypes/tmpl/template.go Adds acceptance template helper for building test config.
linode/reservediptypes/tmpl/data_basic.gotf Adds the basic .gotf template for the new data source.
linode/reservediptypes/datasource_test.go Adds an integration test verifying expected state fields.

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

Comment thread linode/reservediptypes/framework_datasource.go Outdated
Comment thread linode/reservediptypes/framework_datasource.go
Comment thread linode/reservediptypes/datasource_test.go
Copy link
Copy Markdown
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 6 out of 6 changed files in this pull request and generated 1 comment.


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

Comment thread linode/reservediptypes/datasource_test.go
Copy link
Copy Markdown
Contributor

@dawiddzhafarov dawiddzhafarov left a comment

Choose a reason for hiding this comment

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

Also, documentation is missing for this new DS

Comment thread linode/reservediptypes/framework_datasource_schema.go Outdated
Comment thread linode/reservediptypes/framework_models.go Outdated
Comment thread linode/reservediptypes/tmpl/data_basic.gotf
Comment thread linode/reservediptypes/framework_datasource_schema.go
@mawilk90 mawilk90 requested review from mawilk90 and removed request for psnoch-akamai May 4, 2026 11:54
Comment thread linode/reservediptypes/tmpl/data_filter.gotf
@mgwoj mgwoj requested a review from ezilber-akamai May 8, 2026 11:15
Copy link
Copy Markdown
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.

Great work!

@mgwoj mgwoj merged commit fcda183 into linode:proj/reserved-ips May 11, 2026
9 checks passed
@mgwoj mgwoj deleted the feature/TPT-4293-terraform-implement-linode_reserved_ip_types-data-source branch May 11, 2026 16:52
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.

5 participants