Open hkantare opened 1 year ago
looking into it
@ujjwal-ibm There could be some misunderstanding of the original issue reported in the ticket. The bare metal server is not deleted, we met the error when trying to destroy the workspace. And after some investigation we found when the error happened, VPC bare metal API is broken, which cause the data "ibm_is_bare_metal_server_initialization" failed to get the password of the bare metal server. Such error should be caught and a meaningful error message should be sent instead of a terraform exception.
The code snippet is like
inside module "zone_bare_metal_esxi"
data "ibm_is_bare_metal_server_initialization" "esx_host_init_values" {
bare_metal_server = ibm_is_bare_metal_server.esx_host.id
}
output "ibm_is_bare_metal_server_initialization" {
value = data.ibm_is_bare_metal_server_initialization.esx_host_init_values
}
outside module "zone_bare_metal_esxi"
locals {
hosts = {
password = module.zone_bare_metal_esxi.ibm_is_bare_metal_server_initialization.user_accounts[0].password,
}
}
when there is error to retrieve data resource "ibm_is_bare_metal_server_initialization", there should be a more meaningful error message returned instead of reporting a terraform error. Additional details can be found in servicenow : CS3253979