Skip to content

cluster_api_url format change forces resource replacement during provider upgrade #317

@antoinedeschenes

Description

@antoinedeschenes

When upgrading from v0.2.5 to v1.6.0 of the Redpanda Terraform provider, the cluster_api_url attribute format has changed across all resources that use it, causing all affected resources to be marked for replacement.

I believe the provider should do a state migration to move to the new URL format without triggering a resource replacement.

-/+ resource "redpanda_acl" "groups" {
+       allow_deletion        = false
!       cluster_api_url       = "api-xxxxx.example.byoc.prd.cloud.redpanda.com:443" -> "https://api-xxxxx.example.byoc.prd.cloud.redpanda.com" # forces replacement
!       id                    = "GROUP:*:LITERAL:User:app:*:ALL:ALLOW" -> (known after apply)
        # (7 unchanged attributes hidden)
    }

-/+ resource "redpanda_acl" "topics" {
+       allow_deletion        = false
!       cluster_api_url       = "api-xxxxx.example.byoc.prd.cloud.redpanda.com:443" -> "https://api-xxxxx.example.byoc.prd.cloud.redpanda.com" # forces replacement
!       id                    = "TOPIC:*:LITERAL:User:app:*:ALL:ALLOW" -> (known after apply)
        # (7 unchanged attributes hidden)
    }

-/+ resource "redpanda_acl" "transactions" {
+       allow_deletion        = false
!       cluster_api_url       = "api-xxxxx.example.byoc.prd.cloud.redpanda.com:443" -> "https://api-xxxxx.example.byoc.prd.cloud.redpanda.com" # forces replacement
!       id                    = "TRANSACTIONAL_ID:*:LITERAL:User:app:*:ALL:ALLOW" -> (known after apply)
        # (7 unchanged attributes hidden)
    }

-/+ resource "redpanda_user" "user" {
+       allow_deletion  = false
!       cluster_api_url = "api-xxxxx.example.byoc.prd.cloud.redpanda.com:443" -> "https://api-xxxxx.example.byoc.prd.cloud.redpanda.com" # forces replacement
!       id              = "app" -> (known after apply)
        name            = "app"
        # (3 unchanged attributes hidden)
    }

-/+ resource "redpanda_topic" "topics" {
+       allow_deletion     = false
!       cluster_api_url    = "api-xxxxx.example.byoc.prd.cloud.redpanda.com:443" -> "https://api-xxxxx.example.byoc.prd.cloud.redpanda.com" # forces replacement
!       id                 = "app" -> (known after apply)
        name               = "app"
        # (3 unchanged attributes hidden)
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions