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

chore(hygiene): standardize model variable names + use planmodifiers for `created` #199

Closed parkedwards closed 3 weeks ago

parkedwards commented 3 weeks ago

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

high-level changes:

  1. all copy<Resource>ToModel() helpers will use the tfModel variable name to disambiguate which model (plan, config, state) is being written to. But still be clear about what it is
  2. all resource model variables are renamed to be standardized, so that something like req.State() will be called state, req.Plan() will be a plan, and req.Config() will be a config
  3. use a UseStateForUnknown for created attributes, to reduce (known after apply) outputs for immutable attributes
parkedwards commented 3 weeks ago

supersedes #108