Skip to content

Make config_id nullable for the VPC IPs data source #1953

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

Merged

Conversation

zliang-akamai
Copy link
Member

📝 Description

Set the config_id to null when 0 is returned from linodego.

We don't want to make a breaking change at this time for the corresponding field in linodego so checking the zero value here as a workaround.

✔️ How to Test

make test-int PKG_NAME="vpcips"

Due to an potential API bug, the API filters are not available and may cause the test failure. We can temporary remove the filters in the test config template to make it pass locally, as long as there is not another Linode instance in you account with a VPC IP.

diff --git a/linode/vpcips/tmpl/data_basic.gotf b/linode/vpcips/tmpl/data_basic.gotf
index a4d70cbc..dc226bee 100644
--- a/linode/vpcips/tmpl/data_basic.gotf
+++ b/linode/vpcips/tmpl/data_basic.gotf
@@ -65,10 +65,6 @@ resource "linode_instance_config" "barfoo" {
 
 data "linode_vpc_ips" "foobar" {
   depends_on = [linode_instance_config.foobar, linode_instance_config.barfoo]
-  filter {
-      name = "linode_id"
-      values = [linode_instance.foobar.id, linode_instance.barfoo.id]
-    }
 }
 
 data "linode_vpc_ips" "barfoo" {

@zliang-akamai zliang-akamai requested a review from a team as a code owner July 1, 2025 07:22
@zliang-akamai zliang-akamai requested review from ykim-akamai and ezilber-akamai and removed request for a team July 1, 2025 07:22
@zliang-akamai zliang-akamai added the improvement for improvements in existing functionality in the changelog. label Jul 1, 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.

Test passed locally after removing the filter as you suggested. Do we want to remove it in this PR as well to avoid breaking the tests?

@ykim-akamai ykim-akamai requested review from a team, PawelSnoch and yec-akamai and removed request for ykim-akamai and a team July 18, 2025 21:46
@lgarber-akamai lgarber-akamai removed the request for review from PawelSnoch July 24, 2025 18:11
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.

The change works well, i wonder if we should remove the filter from the test for now until the API issue get fixed?

@zliang-akamai
Copy link
Member Author

The change works well, i wonder if we should remove the filter from the test for now until the API issue get fixed?

The filter is required for accounts running multiple tests like our test accounts. I will be following up with the issue and modify the test if it's still not fixed before project branch merged.

@zliang-akamai zliang-akamai merged commit 9cb5b76 into proj/linode-interfaces Jul 25, 2025
11 checks passed
@zliang-akamai zliang-akamai deleted the zhiwei/nullable-config-id-vpc-ip branch July 25, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement for improvements in existing functionality in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants