ably / terraform-provider-ably

Ably's Terraform Provider, enabling you to manage your Ably account programmatically.
https://registry.terraform.io/providers/ably/ably
Apache License 2.0
11 stars 2 forks source link

Terrafrom replaces all resources when something changed in App #143

Closed kandreasyan closed 1 year ago

kandreasyan commented 1 year ago

Terrafrom wants to destroy all resources when something changed in the App resource because of the "app_id"

  # ably_app.test will be updated in-place
  ~ resource "ably_app" "test" {
      ~ account_id                = "test-test" -> (known after apply)
      ~ id                        = "RPr9Fq" -> (known after apply)
      ~ name                      = "terraform" -> "terraform-dev"
        # (3 unchanged attributes hidden)
    }

  # ably_rule_amqp.test["kafka-connect"] must be replaced
-/+ resource "ably_rule_amqp" "test" {
      ~ app_id       = "RPr9Fq" -> (known after apply) # forces replacement
      ~ id           = "SjDT5Q" -> (known after apply)

Update: This can be a workaround.

  lifecycle {
    ignore_changes = [
      id,
    ]
  }
Morganamilo commented 1 year ago

Sorry for the delay. This is strange as changing the name shouldn't also cause the ID to change. Looks like ID may be missing a tfsdk_resource.UseStateForUnknown(). I'll looking into it Monday.

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-2981