Closed BoudewijnSwen closed 2 years ago
Am I posting this in the wrong place? Or is there any information missing? I would love to provide more feedback if needed, but I am not sure anyone is reading/maintaining this :)
Hi @BoudewijnSwen ,
Can you clean up your state file and try this again?
Ran it again in a clean environment. Same issue.
Now with OV Version: 6.50.00-0452161 SDK version: "6.1.0-13" (local setup of master branch, to be able to use templates for Gen10's)
Main.tf: (omitted all non relevant stuff)
terraform {
required_version = ">= 0.13"
required_providers {
oneview = {
source = "hewlettpackard/oneview"
version = "6.1.0-13"
}
}
}
locals {
workload_hypervisors = {
"hv001" = { sn = "ABCDE", profile_name = "hv001" },
"hv002" = { sn = "XYZ", profile_name = "hv002" }
}
}
data "oneview_server_profile_template" "DL380_Gen9_1_W_SPT" {
name = "${upper(var.env)}_DL380_Gen9_1_W_SPT"
}
resource "oneview_server_profile" "wdhv_profile" {
for_each = local.workload_hypervisors
name = each.value.profile_name
hardware_name = "ILO${each.value.sn}.x.cloud"
server_hardware_type = data.oneview_server_profile_template.DL380_Gen9_1_W_SPT.server_hardware_type
template = data.oneview_server_profile_template.DL380_Gen9_1_W_SPT.uri
scopes_uri = data.oneview_scope.workload.uri
}
Terraform apply:
Terraform will perform the following actions:
# oneview_server_profile.wdhv_profile["hv001"] will be created
+ resource "oneview_server_profile" "wdhv_profile" {
+ hardware_name = "ILOABCDE.x.cloud"
+ name = "hv001"
+ scopes_uri = "/rest/scopes/1e748329-09b5-48be-bdec-27f62bd9a8dc"
+ server_hardware_type = "DL380 Gen9 1"
+ template = "/rest/server-profile-templates/e02cdb3a-c296-436e-9e49-4db490403dc1"
+ update_type = "put"
<values omitted --> All (known after apply)>
}
# oneview_server_profile.wdhv_profile["hv002"] will be created
+ resource "oneview_server_profile" "wdhv_profile" {
+ hardware_name = "ILOXYZ.x.cloud"
+ name = "hv002"
+ scopes_uri = "/rest/scopes/1e748329-09b5-48be-bdec-27f62bd9a8dc"
+ server_hardware_type = "DL380 Gen9 1"
+ template = "/rest/server-profile-templates/e02cdb3a-c296-436e-9e49-4db490403dc1"
+ update_type = "put"
<values omitted --> All (known after apply)>
}
Plan: 2 to add, 0 to change, 0 to destroy.
2022-03-16T12:11:00.287+0100 [DEBUG] command: asking for input: "\nDo you want to perform these actions?"
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
2022-03-16T12:11:04.776+0100 [INFO] backend/local: apply calling Apply
2022-03-16T12:11:04.776+0100 [DEBUG] Building and walking apply graph for NormalMode plan
2022-03-16T12:11:04.777+0100 [DEBUG] Resource state not found for node "oneview_server_profile.wdhv_profile[\"hv001\"]", instance oneview_server_profile.wdhv_profile["hv001"]
2022-03-16T12:11:04.777+0100 [DEBUG] Resource state not found for node "oneview_server_profile.wdhv_profile[\"hv002\"]", instance oneview_server_profile.wdhv_profile["hv002"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile.wdhv_profile[\"hv001\"]" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_firmware_drivers.hpe_service_pack_2021_10_0 (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile.wdhv_profile (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_appliance_time_and_locale.config (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile_template.DL360_Gen10_Plus_1_W_SPT (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_firmware_drivers.hpe_2021_05_0_and_qlogic_2_29_2_bundle (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_firmware_drivers.qlogic_firmware_2_29_2 (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_scope.workload (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile.wdhv_profile[\"hv002\"]" (*terraform.NodeApplyableResourceInstance) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_scope.management (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_firmware_drivers.hpe_service_pack_2021_05_0 (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_scope.management (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "data.oneview_scope.workload (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile_template.DL360_Gen10_Plus_1_M_SPT (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_firmware_drivers.hpe_2021_05_0_and_qlogic_2_29_2_bundle (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile_template.DL380_Gen9_1_M_SPT (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.778+0100 [DEBUG] ProviderTransformer: "oneview_server_profile_template.DL380_Gen9_1_W_EHV_SPT (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hewlettpackard/oneview"]
2022-03-16T12:11:04.779+0100 [DEBUG] ReferenceTransformer: "local.ov_endpoint (expand)" references: [var.env var.ov_domain var.env]
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var._1w1_ilo_hv01_pw" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile_template.DL380_Gen9_1_W_EHV_SPT (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ov_username" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "data.oneview_firmware_drivers.hpe_service_pack_2021_10_0 (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ilo_default_password" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_scope.workload (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile_template.DL360_Gen10_Plus_1_M_SPT (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "local.ov_dns_servers (expand)" references: [var.mgt_subnet var.mgt_subnet]
2022-03-16T12:11:04.780+0100 [INFO] ReferenceTransformer: reference not found: "each.value"
2022-03-16T12:11:04.780+0100 [INFO] ReferenceTransformer: reference not found: "each.value"
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile.wdhv_profile[\"hv002\"]" references: [local.workload_hypervisors (expand) var.env data.oneview_scope.workload (expand) data.oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand) data.oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand)]
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ov_password" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ov_domain" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "local.workload_hypervisors (expand)" references: [var.ilo_default_username var._1w1_ilo_hv01_pw var.ilo_default_username var._1w1_ilo_hv02_pw]
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ov_api_version" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_firmware_drivers.hpe_2021_05_0_and_qlogic_2_29_2_bundle (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile_template.DL380_Gen9_1_M_SPT (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "data.oneview_firmware_drivers.hpe_service_pack_2021_05_0 (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_scope.management (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile.wdhv_profile (expand)" references: [local.workload_hypervisors (expand)]
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile_template.DL360_Gen10_Plus_1_W_SPT (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "data.oneview_scope.management (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ov_ssl_enabled" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ilo_user_password" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_appliance_time_and_locale.config (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.mgt_subnet" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "data.oneview_scope.workload (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var._1w1_ilo_hv02_pw" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "data.oneview_firmware_drivers.qlogic_firmware_2_29_2 (expand)" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.env" references: []
2022-03-16T12:11:04.780+0100 [DEBUG] ReferenceTransformer: "var.ilo_default_username" references: []
2022-03-16T12:11:04.780+0100 [INFO] ReferenceTransformer: reference not found: "each.value"
2022-03-16T12:11:04.782+0100 [INFO] ReferenceTransformer: reference not found: "each.value"
2022-03-16T12:11:04.782+0100 [DEBUG] ReferenceTransformer: "oneview_server_profile.wdhv_profile[\"hv001\"]" references: [local.workload_hypervisors (expand) data.oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand) var.env data.oneview_scope.workload (expand) data.oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand)]
2022-03-16T12:11:04.782+0100 [DEBUG] ReferenceTransformer: "data.oneview_firmware_drivers.hpe_2021_05_0_and_qlogic_2_29_2_bundle (expand)" references: []
2022-03-16T12:11:04.782+0100 [DEBUG] ReferenceTransformer: "data.oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand)" references: []
2022-03-16T12:11:04.782+0100 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hewlettpackard/oneview\"]" references: [var.ov_ssl_enabled var.ov_username var.ov_api_version local.ov_endpoint (expand) var.ov_password]
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: data.oneview_firmware_drivers.hpe_2021_05_0_and_qlogic_2_29_2_bundle (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: data.oneview_firmware_drivers.qlogic_firmware_2_29_2 (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_server_profile_template.DL380_Gen9_1_W_EHV_SPT (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_scope.workload (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_server_profile_template.DL360_Gen10_Plus_1_M_SPT (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: data.oneview_firmware_drivers.hpe_service_pack_2021_10_0 (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: local.ov_dns_servers (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: data.oneview_firmware_drivers.hpe_service_pack_2021_05_0 (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_scope.management (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: data.oneview_scope.management (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_server_profile_template.DL360_Gen10_Plus_1_W_SPT (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_server_profile_template.DL380_Gen9_1_W_SPT (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_appliance_time_and_locale.config (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_firmware_drivers.hpe_2021_05_0_and_qlogic_2_29_2_bundle (expand) is no longer needed, removing
2022-03-16T12:11:04.784+0100 [DEBUG] pruneUnusedNodes: oneview_server_profile_template.DL380_Gen9_1_M_SPT (expand) is no longer needed, removing
2022-03-16T12:11:04.786+0100 [DEBUG] Starting graph walk: walkApply
2022-03-16T12:11:04.788+0100 [DEBUG] created provider logger: level=debug
2022-03-16T12:11:04.788+0100 [INFO] provider: configuring client automatic mTLS
2022-03-16T12:11:04.803+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/terraform-provider-oneview_v6.1.0-13 args=[.terraform/providers/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/terraform-provider-oneview_v6.1.0-13]
2022-03-16T12:11:04.804+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/terraform-provider-oneview_v6.1.0-13 pid=14977
2022-03-16T12:11:04.804+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/terraform-provider-oneview_v6.1.0-13
2022-03-16T12:11:04.826+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: configuring server automatic mTLS: timestamp=2022-03-16T12:11:04.826+0100
2022-03-16T12:11:04.899+0100 [DEBUG] provider: using plugin: version=5
2022-03-16T12:11:04.899+0100 [DEBUG] provider.terraform-provider-oneview_v6.1.0-13: plugin address: address=/tmp/plugin324506112 network=unix timestamp=2022-03-16T12:11:04.898+0100
2022-03-16T12:11:05.036+0100 [WARN] ValidateProviderConfig from "provider[\"registry.terraform.io/hewlettpackard/oneview\"]" changed the config value, but that value is unused
2022-03-16T12:11:05.152+0100 [WARN] Provider "registry.terraform.io/hewlettpackard/oneview" produced an invalid plan for oneview_server_profile.wdhv_profile["hv002"], but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .update_type: planned value cty.StringVal("put") for a non-computed attribute
- .volume_attachments: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .boot_mode: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .connection_settings: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .management_processor: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .san_storage: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .bios_option: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .boot: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .firmware: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .local_storage: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .os_deployment_settings: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
2022-03-16T12:11:05.152+0100 [WARN] Provider "registry.terraform.io/hewlettpackard/oneview" produced an invalid plan for oneview_server_profile.wdhv_profile["hv001"], but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .update_type: planned value cty.StringVal("put") for a non-computed attribute
- .boot_mode: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .connection_settings: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .management_processor: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .san_storage: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .volume_attachments: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .bios_option: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .boot: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .firmware: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .local_storage: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
- .os_deployment_settings: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
oneview_server_profile.wdhv_profile["hv001"]: Creating...
oneview_server_profile.wdhv_profile["hv002"]: Creating...
2022-03-16T12:11:05.152+0100 [INFO] Starting apply for oneview_server_profile.wdhv_profile["hv001"]
2022-03-16T12:11:05.153+0100 [INFO] Starting apply for oneview_server_profile.wdhv_profile["hv002"]
2022-03-16T12:11:05.155+0100 [DEBUG] oneview_server_profile.wdhv_profile["hv001"]: applying the planned Create change
2022-03-16T12:11:05.155+0100 [DEBUG] oneview_server_profile.wdhv_profile["hv002"]: applying the planned Create change
2022-03-16T12:11:05.161+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "volume_attachments" from ComputedKeys: timestamp=2022-03-16T12:11:05.161+0100
2022-03-16T12:11:05.161+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "boot" from ComputedKeys: timestamp=2022-03-16T12:11:05.161+0100
2022-03-16T12:11:05.161+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "firmware" from ComputedKeys: timestamp=2022-03-16T12:11:05.161+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "boot_mode" from ComputedKeys: timestamp=2022-03-16T12:11:05.161+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "management_processor" from ComputedKeys: timestamp=2022-03-16T12:11:05.161+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "local_storage" from ComputedKeys: timestamp=2022-03-16T12:11:05.162+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "connection_settings" from ComputedKeys: timestamp=2022-03-16T12:11:05.162+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "os_deployment_settings" from ComputedKeys: timestamp=2022-03-16T12:11:05.162+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "san_storage" from ComputedKeys: timestamp=2022-03-16T12:11:05.162+0100
2022-03-16T12:11:05.162+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "bios_option" from ComputedKeys: timestamp=2022-03-16T12:11:05.162+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "firmware" from ComputedKeys: timestamp=2022-03-16T12:11:05.166+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "volume_attachments" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "management_processor" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "local_storage" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "boot_mode" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "boot" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "bios_option" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "os_deployment_settings" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "san_storage" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.167+0100 [INFO] provider.terraform-provider-oneview_v6.1.0-13: 2022/03/16 12:11:05 [DEBUG] setting computed for "connection_settings" from ComputedKeys: timestamp=2022-03-16T12:11:05.167+0100
2022-03-16T12:11:05.418+0100 [ERROR] vertex "oneview_server_profile.wdhv_profile[\"hv002\"]" error: Provider produced inconsistent result after apply
2022-03-16T12:11:05.524+0100 [ERROR] vertex "oneview_server_profile.wdhv_profile[\"hv001\"]" error: Provider produced inconsistent result after apply
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to oneview_server_profile.wdhv_profile["hv002"], provider "provider[\"registry.terraform.io/hewlettpackard/oneview\"]" produced an unexpected new value: Root
│ resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to oneview_server_profile.wdhv_profile["hv001"], provider "provider[\"registry.terraform.io/hewlettpackard/oneview\"]" produced an unexpected new value: Root
│ resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
2022-03-16T12:11:05.629+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-16T12:11:05.631+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/terraform-provider-oneview_v6.1.0-13 pid=14977
2022-03-16T12:11:05.631+0100 [DEBUG] provider: plugin exited
BTW: Copy-pasting most of the settings (not the "compliance_control" attributes) from the template into the "oneview_server_profile" resource and creating it like that seems to work fine. Also applying the template via the UI works fine as well.
Hi @BoudewijnSwen ,
After looking into your configuration, we found that you're using template uri instead of template name during server profile creation.
Correct configuration will be:
resource "oneview_server_profile" "hv1_profile" { name = "hv1" hardware_name = data.oneview_server_hardware.hv1.name server_hardware_type = data.oneview_server_profile_template.DL380_Gen9_1_SPT.server_hardware_type template = data.oneview_server_profile_template.DL380_Gen9_1_SPT.name scopes_uri = data.oneview_scope.scope.uri } We have the correct configuration in our documentation. It is missing in our example which will be fixed. Let us know if it works for you.
Closing this, since we did not hear from you. Please reopen if it is still not fixed
OneView version: 6.40.00-0450507 Terraform OneView provider: version = "6.4.0-13"
After creating a server profile template for a DL380 Gen9 1 and trying to use it for a server profile, I seem to keep running into a bug in the provider.
main.tf:
terraform apply:
Debug log after the apply:
Hopefully this all a clear report and someone can help me out here! If you need additional information, I am happy to provide it!