Closed GilbertK99 closed 8 months ago
I haven't skimmed through the code yet, but something is wrong with the validation for the url
property indeed.
But this works for me. So at least you don't need to add any secrets to the config.
provider "xenorchestra" {
# Must be ws or wss
# username = ""
# password = ""
url = "ws://my.server.int"
insecure = true
}
Thanks for the info. Commenting out the username and password sections does work. Running terraform plan command prompts input of the username and password fields. This is a good workaround for the moment.
Hopefully an update will enable use of normal environment variables soon.
Much appreciated!
@GilbertK99 the url
, username
and password
HCL arguments should be omitted when you want it to fall back to the environment variables. They do not provide a mechanism for instructing Terraform which environment variables to look at.
See that they are specified for each one: url, username, password. It's also worth mentioning that the values set in the provider
block will always override the environment variables.
Assuming the code you mentioned above is what you are testing with, this would be expected behavior (XOA_URL
is not a valid websocket server address).
Thank you so much! @ddelnano @ackjewtn I understand how its meant to work now. My mistake was including the HCL arguments in the code. VS Code kinda fooled me into thinking the attribute is required due to it showing some code errors as shown on this screenshot below.
Hello
I get this error below when i run terraform plan.
Planning failed. Terraform encountered an error while generating this plan. Error: malformed ws or wss URL │ │ with provider["registry.terraform.io/terra-farm/xenorchestra"], │ on providers.tf line 11, in provider "xenorchestra": │ 11: provider "xenorchestra" {
This only happens when i use XOA_URL, XOA_USER and XOA_PASSWORD environment variables. When i replace the variables with the actual values eg. url = "wss://192.168.xx.xx" etc, the terraform plan works as expected.
This is my terraform code:
Any suggestions on what the issue could be?