Closed rismoney closed 1 year ago
data "oneview_ethernet_network" "network" {
count = length(local.netmappings.connections)
name = lookup(local.netmappings.connections[count.index],"networkUri")
}
I think the issue is that it is no longer allowing name to be empty. Looking to see how to work around this. We have valid server configurations with network adapters that do not have a vlan/network assigned to them.
Not sure if this is the culprit - https://github.com/HewlettPackard/terraform-provider-oneview/blob/master/oneview/data_source_ethernet_network.go#L127-133
going to try some code work arounds to nil it.
Ok, I think i have a satisfactory workaround for this edge case. created a fake TF_RESERVED_3000_DONOTRM
data "oneview_ethernet_network" "network" {
count = length(local.netmappings.connections)
name = lookup(local.netmappings.connections[count.index],"networkUri") != "" ? lookup(local.netmappings.connections[count.index],"networkUri") : "TF_RESERVED_3000_DONOTRM"
}
Then I can check the uri if it is equal to the TF_RESERVED val, and then null it for the network_uri, since it IS acceptable as a blank selection on a server profile.
I have updated the OV API to 4000, and TF provider to 7.0 and I am getting errors on the first resource (actually a data item) encountered X 60 (1 for each) as they're all within modules.
Not sure where the breakage is. example:
Codebase works totally fine in 6.6.0. Ran terraform init -upgrade If revert the code back to 6.6.0 it works without issue.