HewlettPackard / terraform-provider-oneview

Automates the provisioning of physical infrastructure from a private cloud using templates from HPE OneView with Terraform
Apache License 2.0
49 stars 30 forks source link

Error: The selected server hardware has health status other than "OK" #548

Closed FalcoSuessgott closed 1 year ago

FalcoSuessgott commented 1 year ago

Adding a Server Profile from a Hardware and a Server Profile Template results in:

data "oneview_server_profile_template" "template" {
  name = "${replace(jsondecode(data.http.ilo.response_body).Product, " ", "_")}_${var.config_pattern}_${var.firmware_baseline}"
}

resource "oneview_server_profile" "this" {
  name          = var.hostname
  hardware_name = var.hostname
  server_hardware_type = data.oneview_server_profile_template.template.server_hardware_type
  template = data.oneview_server_profile_template.template.name
}
Error: The selected server hardware has health status other than "OK". 
│ Select a different server hardware with a healthy status or address the alerts on the server hardware before proceeding.

While I do understand the root cause is to fix the security risks on the ILO. I'm asking if there is a way to bypass risks and force the Server Profile creation?

FalcoSuessgott commented 1 year ago

https://techlibrary.hpe.com/docs/enterprise/servers/oneview5.0/cicf-api/en/index.html#rest/server-profiles:

Comma-separated list of flags for ignoring specific warnings. Calls may use "all" (or "true") to pass all ignore flags, or "none" (or "false") to pass none of them. Quotes are optional. The supported comma-separated list of flags are: ignoreSANWarnings When provided, the operation will ignore warnings for non-critical issues detected in the SAN storage.

I can see the resource supports a force flag provided as query. Does the provider support specifying a query?

nabhajit-ray commented 1 year ago

The force param is not yet supported. We will add this to our backlog and fix it as per our priority.

FalcoSuessgott commented 1 year ago

@nabhajit-ray Opened an MR in the underlying Go-Lib, you might take a look. Really appreciate a Review :)