Skip to content

cloudflare_zero_trust_tunnel_cloudflared: cannot rotate tunnel secret #5561

@ivan-pacheco-c

Description

@ivan-pacheco-c

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.11.4
on darwin_arm64
+ provider registry.terraform.io/cloudflare/cloudflare v5.4.0

Affected resource(s)

cloudflare_zero_trust_tunnel_cloudflared

Terraform configuration files

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 5.4"
    }
  }
}

provider "cloudflare" {
  # set environment variable CLOUDFLARE_API_TOKEN
}

resource "cloudflare_zero_trust_tunnel_cloudflared" "tunnel" {
  account_id    = var.cloudflare_account_id
  name          = "test-tunnel"
  tunnel_secret = base64encode(var.tunnel_secret)
  config_src    = "local"
}

Link to debug output

Not needed

Panic output

│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to cloudflare_zero_trust_tunnel_cloudflared.tunnel, provider "provider[\"registry.terraform.io/cloudflare/cloudflare\"]" produced an unexpected new value: .tunnel_secret: inconsistent
│ values for sensitive attribute.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Expected output

Tunnel token to be updated

Actual output

fail with error

Steps to reproduce

  1. Set environment variable CLOUDFLARE_API_TOKEN
  2. Set Values for cloudflare_account_id and tunnel_secret terraform variables
  3. Run terraform apply
  4. Change the value of tunnel_secret` terraform variable
  5. Run terraform apply

Additional factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.version/5Categorizes issue or PR as related to version 5 of the provider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions