Closed Schluggi closed 3 years ago
Hi @Schluggi
I think you are not providing the correct value for licensing_intent. Valid values are OneView
, OneViewNoiLO
or OneViewStandard
In your case it should be OneViewNoiLO
You can refer REST Docs for more details.
Hi @AsisBagga
thanks for responding. If i change the value to OneViewNoiLO
i got this error (and again, the ressource is not added to the tfstate, but to oneview).
Error: unable to retrieve server hardware %!s(<nil>)
Hi @Schluggi I tried it in my environment it works fine. I am not sure why you're getting that error. I guess this error comes when terraform is not able to find the server hardware during the read operation. I hope you're using our latest branch to create our provider's binary but please confirm.
below is how my configuration looks like:-
provider "oneview" {
ov_username = var.username
ov_password = var.password
ov_endpoint = var.endpoint
ov_sslverify = var.ssl_enabled
ov_apiversion = 2800
ov_ifmatch = "*"
}
// Adds Rack server to the appliance
// Licensing can be OneView or OneviewNoiLO for Managed
resource "oneview_server_hardware" "sh" {
configuration_state = "Managed"
hostname = "--"
username = "--"
password = "--"
licensing_intent = "OneViewNoiLO"
}
@Schluggi Hi, since we have not received any response from your end. We will proceed with closing this issue. If you still have any questions please feel free to reopen this issue or a new issue. Thank you.
Hi,
after #309 was closed, I tested this and encountered a problem.
Demo code:
After applying this, tf shows an error and does not update the tfstate file. But the server hardware was added anyway.
So the second run fails, because the resource is already there.
New try: Now i changed the license to the right one.
New error:
I would think, this should work. Any clues?