jfrog/terraform-provider-artifactory

`artifactory_managed_user` should replace on username change

Closed this issue · 1 comments

Describe the bug

When the username of a artifactory_managed_user changes, the plan indicates that it would update the resource, rather than replacing it. The apply fails with "Error: - Not Found". The resource should

Requirements for and issue

Try to rename a user with Terraform.

resource "artifactory_managed_user" "myuser" {
  name              = "myuser"
  email             = "myuser@example.com"
  disable_ui_access = true
  admin             = false
  profile_updatable = false
  password          = "foobar32!!"
}

Expected behavior

Artifactory doesn't support renaming users, so I would expect the resource to be recreated.

Actual behaviour

Example:

image image

The publish-hdf-2081-playground user continutes to exist after the Terraform apply failed. Deleting the user and running the apply again fixes it.

@NiklasRosenstein Thanks for the report! I've added this to our plan to fix.