jfrog / terraform-provider-artifactory

Terraform provider to manage JFrog Artifactory
https://jfrog.com/artifactory
Apache License 2.0
271 stars 103 forks source link

`artifactory_managed_user`: `terraform validate` fails with "Attribute password string length must be at least 8, got 0" #1031

Closed NiklasRosenstein closed 1 month ago

NiklasRosenstein commented 1 month ago

Describe the bug

With jfrog/artifactory=11.2.0, the artifactory_managed_user fails to validate when passing in a random_password.result.

Example

resource "random_password" "main" {
  length = 24
}

resource "artifactory_managed_user" "main" {
  name              = "foo"
  email             = "foo@example.com"
  disable_ui_access = true
  admin             = false
  profile_updatable = false
  password          = random_password.main.result
}

Gives

❯ terraform  validate
╷
│ Error: Invalid Attribute Value Length
│ 
│   with artifactory_managed_user.main,
│   on main.tf line 25, in resource "artifactory_managed_user" "main":
│   25:   password          = random_password.main.result
│ 
│ Attribute password string length must be at least 8, got 0
╵

Requirements for and issue

Expected behavior

The validation does not fail.

Additional context

This does not happen with jfrog/artifactory<11.2.0

alexhung commented 1 month ago

@NiklasRosenstein Thanks for the report. I'll investigate.