terraform-provider-rundeck icon indicating copy to clipboard operation
terraform-provider-rundeck copied to clipboard

[Bug] Suspected Regression from 0.4.5 --> 0.4.6; "Error: auth_token need to be set of auth_username and auth_password"

Open brettpalmberg opened this issue 2 years ago • 5 comments

Terraform Version

Terraform v1.5.5 provider registry.terraform.io/rundeck/rundeck v0.4.6

Affected Resource(s)

Rundeck provider using "auth_token". The auth_token value is provided via module output. This works if the rundeck provider is pinned to previous version 0.4.5 or earlier.

Example:

provider "rundeck" {
  url         = module.rundeck.url
  api_version = "41"
  auth_token  = module.rundeck.auth_token
}

Debug Output

2023-10-13T13:45:07.825-0400 [ERROR] vertex "provider["registry.terraform.io/rundeck/rundeck"]" error: auth_token need to be set of auth_username and auth_password

Expected Behavior

Clean terraform plan without errors.

Actual Behavior

Error in terraform plan:

error: auth_token need to be set of auth_username and auth_password

Steps to Reproduce

terraform plan

Important Factoids

NA

References

I think this may be related to the PR here: https://github.com/rundeck/terraform-provider-rundeck/pull/103/files

Thank you.

brettpalmberg avatar Oct 13 '23 17:10 brettpalmberg

Can you provide more details here? I was not able to reproduce this with my environment and 0.4.6. I am able to run my plan using just an auth_token specified.

fdevans avatar Oct 23 '23 17:10 fdevans

Thank you @fdevans . I wonder if this occurs when auth_token is provided as an output of another module (rather than an explicit string in the provider block)?

brettpalmberg avatar Oct 26 '23 16:10 brettpalmberg

I thought that too, but I built my test environment that way and it also works as expected.

fdevans avatar Oct 26 '23 16:10 fdevans

Thanks. I will see if there is any additional information I can glean from the debug logging.

brettpalmberg avatar Oct 26 '23 19:10 brettpalmberg

I have the same problem in version 0.4.7

I also think there is a typo in this error: auth_token need to be set of auth_username and auth_password. I think either the aut_token OR the auth_username and auth_password need to be set

Veto8162 avatar Dec 21 '23 12:12 Veto8162

Thanks @DriesdeKort - Feel free to submit a Pull Request if you think the error message can be clearer.

@brettpalmberg - if there isn't any further logs I'm gonna close this

fdevans avatar Sep 21 '24 01:09 fdevans