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
Thank you for raising this issue. If you would like to use Terraform to manage an existing object, you may need to import it first using a command like:
Alternatively, you can define an import block in your .tf files, such as:
import {
to = fortios_switchcontroller_managedswitch.trname
id = "S548DN4K16000129"
}
Otherwise, Terraform will attempt to create a new object, which would duplicate the existing one and raise an error. Let me know if that doesn't solve your question.
We are trying to leverage the below resource to configure the 8 port managed switch we have.
resource "fortios_switchcontroller_managedswitch" "managed-switch" {
for_each = var.managed_switches
switch_id = each.value.switch_id
sn = each.value.sn
name = each.value.name
fsw_wan1_peer = each.value.fsw_wan1_peer
fsw_wan1_admin = each.value.fsw_wan1_admin
poe_detection_type = each.value.poe_detection_type
max_allowed_trunk_members = each.value.max_allowed_trunk_members
dynamic "ports" {
for_each = each.value.ports
content {
port_name = ports.value.port_name
speed_mask = ports.value.speed_mask
vlan = ports.value.vlan
export_to = ports.value.export_to
untagged_vlans {
vlan_name = ports.value.untagged_vlans
}
allowed_vlans {
vlan_name = ports.value.allowed_vlans
}
}
}
}
We can confirm that we have the switch plugged in and is online, but when we run our plan we get the below error.
│ Error: Error creating SwitchControllerManagedSwitch resource: Internal Server Error - Internal error when processing the request (500)
│
│ with module.fortios["firewall"].fortios_switchcontroller_managedswitch.managed-switch["switch_2"],
│ on modules/forti_os/main.tf line 212, in resource "fortios_switchcontroller_managedswitch" "managed-switch":
│ 212: resource "fortios_switchcontroller_managedswitch" "managed-switch" {
│
╵
The text was updated successfully, but these errors were encountered: