Closed ClaireHayard closed 3 years ago
Hi Claire,
Thanks for raising this. We will check and get back to you. Meanwhile, can you try the master branch?
Hi,
I also tried the above Terraform files in the master branch.
I followed the README to install the SDK locally. Then I cloned the project and moved my files to test them at the root of the repo.
I get the same error when trying to apply the Terraform code.
Hi , Have added some fix to master. Can you please check? You should not use the provider from the registry as the fix is not there in the registry yet.
Steps to use provider locally:
Build the provider locally first $pwd /home/terraform-provider-oneview $ls CHANGELOG.md docs go.mod LICENSE oneview variables.tf CONTRIBUTING.md endpoints-support.md go.sum main.go README.md vendor Dockerfile examples HACKING.md 'Migration Support' versions.tf $ go build -o terraform-provider-oneview
Create directory to place the provider $ mdkir -p .terraform/plugins/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/
Copy the provider to the created location $ mv terraform-provider-oneview .terraform/plugins/registry.terraform.io/hewlettpackard/oneview/6.1.0-13/linux_amd64/terraform-provider-oneview_v6.1.0-13
Hello,
I cloned the repo again to pull the fixes you provided and moved my Terraform files to the root of the repo. Then I followed the instructions you provided but I still get the same 404 error.
Hello,
You can find my tfstate file below:
{
"version": 4,
"terraform_version": "1.0.1",
"serial": 4,
"lineage": "7fc267dd-af8e-51ab-9384-6ee299d9b389",
"outputs": {},
"resources": [
{
"mode": "managed",
"type": "oneview_server_profile",
"name": "ServerProfiles",
"provider": "provider[\"registry.terraform.io/hewlettpackard/oneview\"]",
"instances": [
{
"index_key": "SP01",
"status": "tainted",
"schema_version": 0,
"attributes": {
"affinity": "BayAndServer",
"bios_option": [],
"boot": [],
"boot_mode": [],
"connection_settings": [],
"enclosure_group": null,
"firmware": [],
"hardware_name": null,
"hardware_uri": null,
"hide_unused_flex_nics": true,
"hw_filter": null,
"id": "SP01",
"ilo_ip": null,
"initial_scope_uris": null,
"local_storage": [],
"mac_type": "Virtual",
"name": "SP01",
"options": [],
"os_deployment_settings": [],
"power_state": null,
"public_connection": null,
"public_mac": null,
"public_slot_id": null,
"san_storage": [],
"serial_number": null,
"serial_number_type": "Virtual",
"server_hardware_type": null,
"template": "SPTESXTRD",
"type": "ServerProfileV12",
"update_type": null,
"uri": null,
"volume_attachments": [],
"wwn_type": "Virtual"
},
"sensitive_attributes": [],
"private": "bnVsbA=="
},
{
"index_key": "SP02",
"status": "tainted",
"schema_version": 0,
"attributes": {
"affinity": "BayAndServer",
"bios_option": [],
"boot": [],
"boot_mode": [],
"connection_settings": [],
"enclosure_group": null,
"firmware": [],
"hardware_name": null,
"hardware_uri": null,
"hide_unused_flex_nics": true,
"hw_filter": null,
"id": "SP02",
"ilo_ip": null,
"initial_scope_uris": null,
"local_storage": [],
"mac_type": "Virtual",
"name": "SP02",
"options": [],
"os_deployment_settings": [],
"power_state": null,
"public_connection": null,
"public_mac": null,
"public_slot_id": null,
"san_storage": [],
"serial_number": null,
"serial_number_type": "Virtual",
"server_hardware_type": null,
"template": "SPTESXTRD",
"type": "ServerProfileV12",
"update_type": null,
"uri": null,
"volume_attachments": [],
"wwn_type": "Virtual"
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
}
]
}
The fix will be available with next SDK package release.( approx 14th July)
Hi Claire, Can you try the same operation with the new released version?
Hello Nabhajit,
I tested the above code for the use case again and I don't have the 404 error anymore with the new released version (v6.2.0-13).
Thank you,
Claire
Thanks for sharing this. Closing this now
Scenario/Intent
Hello,
I am trying to create multiple server profiles in OneView with the command
terraform apply -var-file=variables.tfvars
but it finishes with a 404 error. However my server profiles are created.Also when I try do run the command
terraform destroy -var-file=variables.tfvars
it just does a refresh and doesn't delete the ressources. Like the apply command it produces a 404 error.Environment Details
Steps to Reproduce
You can fin below the Terraform files I used to create the servers Profile:
Variables.tf file
Variables.tfvars
Main.tf
Expected Result
The Server Profile is created and can be deleted without creating an error.
Actual Result
Error in response: Not Found Response status: 404 Not Found