PrefectHQ / terraform-provider-prefect

Terraform Provider for Prefect Cloud
https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs
Apache License 2.0
29 stars 13 forks source link

Error when creating a `prefect_variable`, issue with `tags` #110

Closed jamiezieziula closed 8 months ago

jamiezieziula commented 8 months ago

version = "0.0.0-alpha5"

When attempting to create a variable with the following config, i receive the below error:

resource "prefect_variable" "example" {
  name  = "my_variable"
  value = "variable value goes here"
}
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to prefect_variable.example, provider "provider[\"registry.terraform.io/prefecthq/prefect\"]" produced an unexpected new value:
│ .tags: was null, but now cty.ListValEmpty(cty.String).
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

The variable is created but when I run a subsequent plan/apply, I see this proposed change which results in the same error as listed above

  # prefect_variable.example is tainted, so must be replaced
-/+ resource "prefect_variable" "example" {
      ~ created = "2023-11-07T19:42:38Z" -> (known after apply)
      ~ id      = "afca6fee-8ff3-49e4-80bb-fd363902095f" -> (known after apply)
        name    = "my_variable"
      - tags    = [] -> null
      ~ updated = "2023-11-07T19:42:38Z" -> (known after apply)
        # (1 unchanged attribute hidden)