Tokens can't be updated once created. Any diff in token data will recreate the token. If any token expire, Rancher2 provider will generate a diff to regenerate it.
password - (Required/ForceNew) The user password (string)
To Reproduce
create a rancher2_custom_user_token resource
change the password attribute
Actual Result
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ rancher2_custom_user_token.this,
│ provider "provider[\"registry.terraform.io/rancher/rancher2\"]" produced an
│ unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
Rancher Server Setup
Information about the Cluster
User Information
N/D
Provider Information
Describe the bug
Changing the 'password' attribute of the
rancher2_custom_user_token
resource doesn't recreate it as documented.https://github.com/rancher/terraform-provider-rancher2/blob/master/docs/resources/custom_user_token.md?plain=1#L15
https://github.com/rancher/terraform-provider-rancher2/blob/master/docs/resources/custom_user_token.md?plain=1#L51
To Reproduce
rancher2_custom_user_token
resourceActual Result
Expected Result
Resource should be recreated
Screenshots
Additional context
Schema is missing a
ForceNew: true,
here: https://github.com/rancher/terraform-provider-rancher2/blob/master/rancher2/schema_custom_user_token.go#L11-L16