pulumi/pkg/importer
Will Jones ed96861543
Allow provider version mismatches when `import`ing resources (#18272)
In #18039 we added the ability to generate code for imports involving
parameterized providers. In doing so, we cleaned up a long-standing TODO
around checking the versions of loaded providers against those in the
state being imported to. While this stricter check brought with it a
higher degree of correctness, it broke a number of workflows, such as
attaching an existing provider instance (which may have a different
version) to an import operation. This happens in some provider CI
workflows and tests, where we want to test an older state file's
compatibility with the new (to-be-released) provider version. In such
cases, the state reports vN and the load returns vN+0.0.1 or the like.
This change restores the old behaviour by introducing explicit errors to
identify when mismatches occur and handling them specially in the
`import` case. #18271 tracks the introduction of something a bit better,
where maybe we allow semver-compatible versions only rather than
allowing everything as we once (and once again) do.

Fixes #18270
2025-01-17 11:29:29 +00:00
..
testdata Support codegen for parameterised imports (#18039) 2025-01-14 00:33:15 +00:00
hcl2.go Allow provider version mismatches when `import`ing resources (#18272) 2025-01-17 11:29:29 +00:00
hcl2_test.go Allow provider version mismatches when `import`ing resources (#18272) 2025-01-17 11:29:29 +00:00
language.go Support codegen for parameterised imports (#18039) 2025-01-14 00:33:15 +00:00
language_test.go Support codegen for parameterised imports (#18039) 2025-01-14 00:33:15 +00:00