Skip to content

[Problem] rancher2_bootstrap resource token_update set to true exposes preceded token while generating new #1412

@ek24014

Description

@ek24014

Rancher Server Setup

  • Rancher version: 2.9.1
  • Installation option (Docker install/Helm Chart): Installed and managed via terraform

Information about the Cluster

  • Kubernetes version: 1.28.5
  • Cluster Type (Local/Downstream): local

Provider Information

  • Rancher v2 Terraform Provider version in use: 4.3.0
  • Terraform version in use: 1.5.5

Describe the bug

rancher2_bootstarp resource has an attribute token_update which generates a new token during terraform apply run.
Example code:

resource "rancher2_bootstrap" "admin" {
provider = rancher2.rancher_bootstrap

initial_password = "<INSTALL_PASSWORD>"
password = "blahblah"
token_update = true
password = "random-generated"
telemetry = false
}

Apply results in removing original token and generating new token in Rancher, while still exposing the original (no longer existing token) as rancher2_bootstrap.admin.token

This is an issue while attempting to store the token in the keyvault as a secret. The value it is trying to store is unusable as well as it results in terraform error:

`Error: Provider produced inconsistent final plan
When expanding the plan for azurerm_key_vault_secret.rancher_admin_token to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/azurerm" produced an invalid new value for .value: inconsistent values for sensitive attribute.

This is a bug in the provider, which should be reported in the provider's own issue tracker. `

Metadata

Metadata

Labels

area/authenticationThis appears to be related to authentication.internal/userThis is a problem identified by a user.status/backlogThis issue is waiting for someone to be available to work it.status/pendingThis issue is being actively worked and moving through the release process.team/collieteam-rancher-collie

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions