opentofu/internal
Martin Atkins 4c439b099f plans/objchange: Don't consider refinements when validating plans
Providers that existed prior to refinements (all of them, at the time of
writing) cannot preserve refinements sent in unknown values in the
configuration, and even if one day providers _are_ aware of refinements
there we might add new ones that existing providers don't know how to
handle.

For that reason we'll absolve providers of the responsibility of
preserving refinements from config into plan by fixing some cases where
we were incorrectly using RawEquals to compare values; that function isn't
appropriate for comparing values that might be unknown.

However, to avoid a disruptive change right now this initial fix just
strips off the refinements before comparing. Ideally this should be using
Value.Equals and handling unknown values more explicitly, but we'll save
that for a possible later improvement.

This does not include a similar exception for validating whether a final
value conforms to a plan because the plan value and the final value are
both produced by the same provider and so providers ought to be able to
be consistent with their _own_ treatment of refinements, if any.
Configuration is special because Terraform itself generates that, and so
it can potentially contain refinements that a particular provider has no
awareness of.
2023-05-24 13:48:13 -07:00
..
addrs [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
backend Propagate generated config filename into the Terraform graph (#33255) 2023-05-24 13:58:26 +02:00
builtin builtin/providers/terraform: terraform_data "id" is guaranteed non-null 2023-05-24 13:44:08 -07:00
checks [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
cloud cloud: Allow Cloud API to lower the intermediate state snapshot interval 2023-05-23 15:25:48 -07:00
command command/views: Describe unknown collection bounds in diagnostics 2023-05-24 13:44:08 -07:00
communicator [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
configs plannable import: safer config generation and schema filters (#33232) 2023-05-24 11:16:05 +01:00
copy [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
dag [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
depsfile [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
didyoumean [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
e2e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
experiments [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
genconfig plannable import: safer config generation and schema filters (#33232) 2023-05-24 11:16:05 +01:00
getmodules [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
getproviders [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
grpcwrap [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
helper/slowmessage [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
httpclient [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
initwd [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
instances [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
ipaddr [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
lang lang/funcs: startswith considers string prefix refinement 2023-05-24 13:44:08 -07:00
legacy [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
logging [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
modsdir [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
moduledeps [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
moduletest [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
plans plans/objchange: Don't consider refinements when validating plans 2023-05-24 13:48:13 -07:00
plugin [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
plugin6 [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
provider-simple [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
provider-simple-v6 [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
provider-terraform/main [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
providercache [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
providers [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
provisioner-local-exec/main [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
provisioners [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
refactoring [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
registry [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
repl [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
replacefile [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
states cloud: Skip intermediate state snapshots in Terraform Cloud/Enterprise 2023-05-23 15:25:48 -07:00
terminal [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
terraform Propagate generated config filename into the Terraform graph (#33255) 2023-05-24 13:58:26 +02:00
tfdiags [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
tfplugin5 Rebuild protobuf 2023-05-02 11:44:23 -04:00
tfplugin6 Rebuild protobuf 2023-05-02 11:44:23 -04:00