resource "fmc_staticIPv4_route" "StaticRoute1" {
device_id = fmc_devices.Device1.id
interface_name = "Outside"
is_tunneled = false
metric_value = 1
selected_networks {
id = data.fmc_network_objects.any.id
type = data.fmc_network_objects.any.type
name = data.fmc_network_objects.any.name
}
gateway {
object {
id = fmc_host_objects.Host3.id
type = fmc_host_objects.Host3.type
name = fmc_host_objects.Host3.name
}
}
depends_on = [
data.fmc_network_objects.any, fmc_host_objects.Host2, fmc_devices.Device1, fmc_device_physical_interfaces.PhysicalInterface1
]
}
Once I remove object on FMC I have error:
- wrong status code: 404, error category: FRAMEWORK, error severity: ERROR, error messages: [{Resource not found. Please check the UUID passed in url.}] - id:
│ 005056B0-6958-0ed3-0000-004294978619
Workaround:
List the objects with:
terraform state list
data.fmc_network_objects.any
fmc_device_physical_interfaces.PhysicalInterface1
fmc_devices.Device1
fmc_host_objects.Host3
fmc_staticIPv4_route.StaticRoute1
and remove the object:
terraform state rm fmc_staticIPv4_route.StaticRoute1
I have tested it on FMC (7.2.5):
This is my configuration:
Once I remove object on FMC I have error:
Workaround: List the objects with:
and remove the object:
terraform state rm fmc_staticIPv4_route.StaticRoute1