You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using a username/password login with a username that does not end with @* the error provided is not clear as to what the issue is. I was able to peek at the code to identify the issue so this is partially a submission to document what I found and partially because I may or may not try to make a PR if I have time.
To Reproduce
Steps to reproduce the behavior:
Create a resource '....'
Run '....'
See error
Modify the resource '....'
Run '....'
See error
Please also provide a minimal Terraform configuration that reproduces the issue.
terraform {
required_providers {
proxmox={
source ="bpg/proxmox"
version ="0.70.1"
}
}
}
provider"proxmox" {
endpoint=var.proxmox-endpointusername="root"# Missing `@pam`
}
# Any sort of resource definition to kick off the provider. I didn't get far# enough to actually validate below works.resource"proxmox_virtual_environment_download_file""nixos_lxc_25_05" {
content_type="vztmpl"datastore_id="local"node_name="first-node"url="https://hydra.nixos.org/build/287411733/download/1/nixos-system-x86_64-linux.tar.xz"
}
and the output of terraform|tofu apply.
> tofu plan --var-file=.tfvars
Planning failed. OpenTofu encountered an error while generating this plan.
╷
│ Error: Unable to create Proxmox VE API credentials
│
│ with provider["registry.opentofu.org/bpg/proxmox"],
│ on providers.tf line 10, in provider "proxmox":
│ 10: provider "proxmox" {
│
│ must provide either user credentials, an API token, or a ticket
Expected behavior
An error indicating that user cred validation failed rather than wasn't supplied.
Additional context
This is probably the issue here:
Describe the bug
When using a username/password login with a username that does not end with
@*
the error provided is not clear as to what the issue is. I was able to peek at the code to identify the issue so this is partially a submission to document what I found and partially because I may or may not try to make a PR if I have time.To Reproduce
Steps to reproduce the behavior:
Please also provide a minimal Terraform configuration that reproduces the issue.
and the output of
terraform|tofu apply
.Expected behavior
An error indicating that user cred validation failed rather than wasn't supplied.
Additional context
This is probably the issue here:
terraform-provider-proxmox/proxmox/api/credentials.go
Line 58 in 9bd0b57
Looks like the validation logic and variable presence logic was merged leading to the need to throw away errors.
TF_LOG=DEBUG terraform apply
):The text was updated successfully, but these errors were encountered: