-
Notifications
You must be signed in to change notification settings - Fork 47
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
chore: equinix_metal_vlan plugin sdk v2 to framework migration #578
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #578 +/- ##
==========================================
- Coverage 39.89% 39.04% -0.85%
==========================================
Files 109 114 +5
Lines 18977 19186 +209
==========================================
- Hits 7570 7491 -79
- Misses 11202 11489 +287
- Partials 205 206 +1 ☔ View full report in Codecov by Sentry. |
952122d
to
e158b3c
Compare
e158b3c
to
445f79e
Compare
ab9866c
to
146690f
Compare
There are still a bunch of tests failing due to how the provider is set up. I updated all Metal acceptance tests in #586. Now that that is merged, you can rebase this PR on |
146690f
to
d971bc0
Compare
d971bc0
to
1fd3477
Compare
Signed-off-by: Ayush Rangwala <[email protected]>
Signed-off-by: Ayush Rangwala <[email protected]>
b57a53d
to
dd38b3c
Compare
dd38b3c
to
66d209a
Compare
66d209a
to
69cafa4
Compare
69cafa4
to
e8ff49c
Compare
Needed to update the resource schema slightly so that:
Commit with those changes is here: 5fc7417 |
Signed-off-by: Charles Treatman <[email protected]>
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.
After updating the resource schema to handle switching from facility to metro, the only test failure in CI was a post-test cleanup failure in a metal port test.
When the equinix_metal_vlan resource was migrated (#578) from terraform-plugin-sdk/v2 (SDKv2) to terraform-plugin-framework (framework), some unintended behavior was introduced around the description and metro attributes. For equinix_metal_vlan resources under SDKv2, description was an optional attribute and metro was case insensitive, but after migration from SDKv2 to framework, the description was set to `""` when the attribute was omitted, and metro was required to be lower-case to avoid terraform errors. This updates the VLAN model parsing function so that: - if there is already metro value configured in state and it is equal to the value received from the API or from the config, ignoring case, then the value that is already in state is used instead of the value from the API - if there is no description in the API response, the description property is omitted entirely instead of being set to an empty string `TestAccMetalVlan_NoDescription` has been added to validate the resource behavior when the description is omitted and `TestAccMetalVlan_metro` has been updated to validate behavior when metro is specified in uppercase. Fixes #633
Part of #612