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: Post "hponeview/rest/login-sessions": unsupported protocol scheme "" #434

Closed will-code-for-pizza closed 2 years ago

will-code-for-pizza commented 2 years ago

Hi...

I have the following beginner issue with "oneview" provider:

Terraform 1.0.11 terraform-provider-oneview_v6.3.1-13 HP OneView appliance firmware 6.30.00-0447630

test.tf

# Create terraform OneView client
provider "oneview" {
        ov_username  = "my-user"
        ov_password  = "my-pass"
        ov_endpoint  = "my-url-to-hponeview"
        ov_sslverify = "false"
        ov_domain    = "my-domain"
        ov_apiversion = 3200
        ov_ifmatch = "*"
}

data "oneview_server_hardware" "server_hardware" {
  name = "my-server-name-to-investigate"
}

output "oneview_server_hardware_value" {
  value = data.oneview_server_hardware.server_hardware.uri

results in

# terraform init
# terraform plan

Error: Post "my-url-to-hponeview/rest/login-sessions": unsupported protocol scheme ""

  on test.tf line 12, in provider "oneview":
  12: provider "oneview" {

Have I missed something ?

Regards and thanks in advance.

will-code-for-pizza commented 2 years ago

Solved by myself:

ov_endpoint = "my-url-to-hponeview" has to be prefixed with http://