Skip to content

Backport of Relax resource identity validation into v1.12 #36991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 7, 2025

Backport

This PR is auto-generated from #36989 to be assessed for backporting due to the inclusion of the label 1.12-backport.

The below text is copied from the body of the original PR.


This PR removes two resource identity validations:

  1. That an identity hasn't changed. Some resources have mutable identities, and the provider SDK can provide better safeguards and opt-out behaviour than enforcing this for every resource type in Terraform.
  2. That an identity can't contain null values. Some identities need some sort of "optional" attribute, so we won't enforce that values must be non-null. This shifts some responsibility to provider authors that a resource identity is still uniquely identifiable even with null values.

Target Release

1.12.x

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

Overview of commits

xiaozhu36 and others added 30 commits March 3, 2025 17:19
* ./scripts/changelog.sh nextminor

This turns main into 1.13 dev branch

* update PR template
Non-comparable diagnostics were being adding multiple times, which might
also panic in the equality comparison
…ibutes to null (#36824)

* write-only attributes: internal providers should set write-only attributes to null

* add changelog

* fix copywrite headers
Extra values can be any type, and are only asserted by interface by the
party expecting that interface so we can't attempt to compare them for
equality.

The only diagnostic type with Extra values which implements Equals is
and hcl diagnostic.
The source check was skipped if either value was nil, but we can't be
sure they are equal if there is no value. This may prove to be
problematic is tests, as diagnostic equality for deduplication isn't
strict equality, but rather relies on being able to prove the context is
also equal.
fix issues with diagnostic deduplication
Fix non-user facing bugs where appended diags are not returned in `terraform` provider
…36787)

* stacks: allow removed blocks to target components in nested stacks

* make copywrite fix

* fix comments
)

* stacks: include existing components when deferring nested stacks

* improve comments
backend/oss: Supports more standard environment variables to keep same with provider setting
…36814)

* stacks: update removed blocks to allow targeting of embedded stacks

* copywrite headers
Removing typo per #36859.
Highlighted the syntax example (//) next to the plain-text "A special double-slash syntax" for better visibility
remove bucket name from s3:prefix condition in IAM policy
…col (#36878)

* grpcwrap+provider-simple: Test ephemeral resource schemas in v5 protocol

* Update internal/command/e2etest/providers_schema_test.go

Co-authored-by: Daniel Banck <[email protected]>

---------

Co-authored-by: Daniel Banck <[email protected]>
…is invoked (#36852)

* Fix defects where `done` is called before the command's `Run` method is invoked

We're attempting to reading output from a command that hasn't been executed yet!

* Another one
liamcervante and others added 24 commits April 24, 2025 08:56
* stacks: improve test coverage for removed blocks

* remove leftover comment
* stacks: removed blocks should refresh during refresh plans

* fix copywrite headers

* clarify return values of DefinedByStackInstance
* Validate identity to match identity schema

* validate on new create too  and add tests

* validate schema nesting type

* validate required attrs

* remove need for extra fn

---------

Co-authored-by: Samsondeen Dare <[email protected]>
* Add changelog entries for resource identities

* Remove changelog
…temigrate-and-command

Break dependency of stack migrate on command Meta to prevent import cycles
@dbanck
Copy link
Member

dbanck commented May 7, 2025

Closed in favor of #36992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.