Open jgomezve opened 1 year ago
@jgomezve the current SDK can't distinguish the difference between the empty string and non-provided parameter, we default the value to 12345 for the route tag as it is the default value provided in the default template. the new framework of terraform provider seems to have a way to distinguish it, but it will be heavy lifting if we change to use it.
@dsx1123 is there any way to set the Tag to an empty string ""
?
@jgomezve currently, there is no way, if we change the default value to ""
, it will break the backward compatibility, this tag is usually used for route filtering, will setting it to a dummy string be a workaround for you?
I dont want to have the tag set on the SVI IP address.
interface Vlan2300
vrf member vrf_tier2_lb_inside
no ip redirects
ip address 192.168.0.1/24 tag 12345
fabric forwarding mode anycast-gateway
no shutdown
I guess a dummy tag won't cause any problem but still it's something customers want to avoid
Community Note
Terraform Version
1.3.5.
DCNM version
V 12.1.1e
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Routing Tag in NDFC should not be set to the default value (12345)
Actual Behavior
The value of the Routing Tag field should be empty but it configures the default value
Steps to Reproduce
terraform apply
Important Factoids
References
GetOk()
https://github.com/hashicorp/terraform-plugin-sdk/blob/2b557120cdae1e960aead54a299748a418ca3e94/helper/schema/resource_data.go#L84 assumes an empty string""
as the Zero Value for theTypeString
type https://github.com/hashicorp/terraform-plugin-sdk/blob/2b557120cdae1e960aead54a299748a418ca3e94/helper/schema/schema.go#L2358. TheGetOk()
function is used in the Create function() https://github.com/CiscoDevNet/terraform-provider-dcnm/blob/d0ff6c3b92fbe1dfbe1e55e4928a56edf2916879/dcnm/resource_dcnm_network.go#L693