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

fix: set default empty string for `prefect_workspace_role.description` #114

Closed parkedwards closed 8 months ago

parkedwards commented 8 months ago

resolves https://github.com/PrefectHQ/terraform-provider-prefect/issues/112

here, we'll modify the Description upsert param to be a string (not pointer), so we pass an empty "" instead of a null - the null causes issues on create/update because of a pydantic failure on the API

we'll set a Default configuration so we do not run into an unexpected attribute error, as the API will return a "" instead of a null -- we want to still give the operator an option to not include a description, which is handled now by defaulting the state plan with "" if no value is set, which will match the empty value from the API