You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to equinix_metal_vlan.vlans[1], provider "provider[\"registry.terraform.io/equinix/equinix\"]" produced an unexpected new value: .metro: was cty.StringVal("TY"), but now cty.StringVal("ty").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Works fine in provider 1.24.0. If a put metro in lower case, then I get the error:
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to equinix_metal_vlan.vlans[0], provider "provider[\"registry.terraform.io/equinix/equinix\"]" produced an unexpected new value: .description: was null, but now cty.StringVal("").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
dnoland1
changed the title
[Bug]: equinix_metal_vlan breaks when metro is upper case
[Bug]: equinix_metal_vlan breaks when metro is upper case or description is not specified
Apr 1, 2024
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
Terraform Version
Terraform 1.7.4 on darwin_arm64
Equinix Provider Version
1.34.0
Effected Terraform Resources
equinix_metal_vlan
Terraform Config Files
Debug Output
Panic Output
No response
Expected Behavior
No error
Actual Behavior
Received error
Steps to Reproduce
Specify metro in uppercase as it's defined in the documentation at
List of metros: https://deploy.equinix.com/developers/docs/metal/locations/metros/#metros-quick-reference
Works fine in provider 1.24.0. If a put metro in lower case, then I get the error:
Could workaround above bug by adding
description = ""
to the equinix_metal_vlan resource, but according to the docs at https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_metal_vlan#description , it's supposed to be an optional attribute.The text was updated successfully, but these errors were encountered: