-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Terraform Core Version
1.7.1
ONTAP Provider Version
2.1.1
Affected Resource(s)
- netapp-ontap_port
Expected Behavior
Importing ethernet_port (VLAN) resources should work in multi-node clusters. The following configuration should apply successfully:
import {
to = module.....netapp-ontap_port.data["nodea"]
id = "cluster1,a0a-1234"
}
import {
to = module.....netapp-ontap_port.data["nodeb"]
id = "cluster1,a0a-1234"
}
(note that the import identifier does not currently contain the nodename - which makes the portname alone ambiguous)
Actual Behavior
Importing ethernet_port (VLAN) resources does not work in multi-node clusters. The following configuration produces an error:
import {
to = module.....netapp-ontap_port.data["nodea"]
id = "cluster1,a0a-1234"
}
import {
to = module.....netapp-ontap_port.data["nodeb"]
id = "cluster1,a0a-1234"
}
Relevant Error/Panic Output Snippet
╷
│ Error: Error Reading Ethernet Port Info
│
│ Error on GET /network/ethernet/ports/: received 2 or more records when only
│ one is expected - statusCode 200, err=<nil>,
│ response=restclient.RestResponse{NumRecords:2,
│ Records:[]map[string]interface {}{...}
Terraform Configuration Files
resource "netapp-ontap_port" "data" {
for_each = toset(["nodea"], ["nodeb"])
cx_profile_name = "cluster1"
broadcast_domain = {
id = netapp-ontap_network_broadcast_domain.data.id
}
node = {
name = each.key
}
type = "vlan"
vlan = {
base_port = "a0a"
tag = "1234"
}
}
Steps to Reproduce
- terraform init
- terraform plan
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
Yes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working