CiscoDevNet / terraform-provider-fmc

Terraform Provider for FMC
https://registry.terraform.io/providers/CiscoDevNet/fmc/latest/docs
Mozilla Public License 2.0
16 stars 31 forks source link

Deployment to FTD fails: Warning: Error in deployment, there might be another deployment in progress! #4

Closed mschedrin closed 3 years ago

mschedrin commented 3 years ago

I can't get deployment to FTD working. If I deploy same changes from web ui, it works just fine. Here is terraform output:

fmc_network_objects.LAN: Creating...
fmc_host_objects.quad1: Creating...
fmc_host_objects.quad1: Creation complete after 1s [id=00505697-F96A-0ed3-0000-146028890910]
fmc_network_objects.LAN: Creation complete after 2s [id=00505697-F96A-0ed3-0000-146028890928]
fmc_access_rules.access_rule_1: Creating...
fmc_access_rules.access_rule_1: Creation complete after 2s [id=00505697-F96A-0ed3-0000-000268440584]
fmc_ftd_deploy.ftd: Creating...
fmc_ftd_deploy.ftd: Creation complete after 3s [id=Error in deployment, there might be another deployment in progress for device Name: test ID: 289140c4-2369-11ea-938e-91f922b309a7]
â•·
│ Warning: Error in deployment, there might be another deployment in progress!
│
│   with fmc_ftd_deploy.ftd,
│   on main.tf line 87, in resource "fmc_ftd_deploy" "ftd":
│   87: resource "fmc_ftd_deploy" "ftd" {
│
│ deploying to device: https://x.x.x.x/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/deployment/deploymentrequests - wrong status code: 500, error category: VALIDATION, error severity: ERROR, error messages:   
│ [{Errors or warnings present in Device committed policies:} {Warning: This rule uses zones that do not include interfaces from any of the targeted device(s). Traffic through these device(s) will never match this rule.} {Warning:  
│ This rule contains a zone with no defined interfaces.}]
╵

Apply complete! Resources: 4 added, 0 changed, 0 destroyed.

Outputs:

fmc_deploy_id = "Error in deployment, there might be another deployment in progress for device Name: test ID: 289140c4-2369-11ea-938e-91f922b309a7"

Deploy resource is as following:

resource "fmc_ftd_deploy" "ftd" {
  device         = data.fmc_devices.device.id
  ignore_warning = false
  force_deploy   = true
  depends_on     = [ fmc_access_rules.access_rule_1 ]
  lifecycle {
    ignore_changes = [
      id,
    ]
  }
}

Am I doing something wrong or is this a bug? FMC version is 6.6.0 (build 90)

mschedrin commented 3 years ago

I figured that out, I overlooked that ignore_warning was set to false. Setting it to true has resolved the issue. Error message could be more comprehensive though.