PrefectHQ / terraform-provider-prefect

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

fix: use terraform JSON types, for semantic equality checks #104

Closed parkedwards closed 11 months ago

parkedwards commented 11 months ago

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

Previously, the base_job_template attribute was set to a StringValue -- this caused issues with state refresh, as the Provider failed equality checks due to non-semantic differences in the byte slice (aka ordering of keys, likely differences in indentation, etc.)

Instead, we use the terraform-plugin-framework jsontype package, which exposes a Normalized type that does exactly this -- checks for semantic equality between two valid JSON strings

github.com/hashicorp/terraform-plugin-framework-jsontypes

also, adds acceptance tests for the work-pools resource, per https://github.com/PrefectHQ/terraform-provider-prefect/issues/81