TPT-4297: terraform: Implement linode_tag Data Source with Reserved IPv4 Support#2330
Conversation
There was a problem hiding this comment.
Pull request overview
Implements a Terraform Plugin Framework-based linode_tag data source to fetch a tag’s associated objects, including support for reserved_ipv4_address associations.
Changes:
- Added
linode_tagframework data source (schema, model flattening, and Read implementation). - Added unit + integration tests, including a reserved IPv4 tagging scenario.
- Registered the new data source in the framework provider and added user-facing documentation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| linode/tag/framework_datasource.go | Adds the linode_tag framework data source Read implementation. |
| linode/tag/framework_datasource_model.go | Flattens Linode API tagged-object results (incl. reserved IPv4) into TF state. |
| linode/tag/framework_datasource_schema.go | Defines data source schema, including objects nested list. |
| linode/tag/framework_models_unit_test.go | Unit-tests flattening for reserved_ipv4_address and linode. |
| linode/tag/datasource_test.go | Adds acceptance tests for basic tag lookup and reserved IPv4 tagging. |
| linode/tag/tmpl/* | Adds acceptance test HCL template for the data source. |
| linode/framework_provider.go | Registers tag.NewDataSource in the framework provider. |
| docs/data-sources/tag.md | Adds documentation for linode_tag data source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot resolve the merge conflicts in this pull request |
b4a80a3 to
10be5cd
Compare
…resource-and-data-source-for-reserved-ip-for-ipv4
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e/TPT-4297-terraform-update-linode_tag-resource-and-data-source-for-reserved-ip-for-ipv4
…te-linode_tag-resource-and-data-source-for-reserved-ip-for-ipv4
lgarber-akamai
left a comment
There was a problem hiding this comment.
Works well in my local testing!
📝 Description
The Linode API supports tagging resources via POST /tags. Tags are a lightweight organisational primitive that can be applied to Linodes, Domains, Volumes, NodeBalancers, and — as of a recent API addition — reserved IPv4 addresses.
The Terraform provider does not currently have a Framework-based linode_tag data source. Tag labels and their resource associations are already manageable through the tags field on individual resources (e.g. linode_networking_ip.tags). Adding a dedicated linode_tag resource would create a parallel, ForceNew path to a relationship that can already be managed in-place, so only the data source is implemented in this story.
✔️ How to Test