Skip to content

resourceIdentityGeneration: use nil check instead of error when calling identity()#10804

Merged
modular-magician merged 1 commit intohashicorp:FEATURE-BRANCH-resource-identity-generationfrom
modular-magician:downstream-pr-2acb0efb335689de74cc1532001e19a42e94fc6d
Sep 27, 2025
Merged

resourceIdentityGeneration: use nil check instead of error when calling identity()#10804
modular-magician merged 1 commit intohashicorp:FEATURE-BRANCH-resource-identity-generationfrom
modular-magician:downstream-pr-2acb0efb335689de74cc1532001e19a42e94fc6d

Conversation

@modular-magician
Copy link
Copy Markdown
Collaborator

after running tests, we ran into missing identity() errors being shown due to

  • handwritten resources not having the identity schema but utilizing the identity in importStateUpgrade
  • using identity() in data sources

this PR makes it so that we do a nil check of the identityData type and prevent the use of identtiy setting and getting in the event that identityData is nil

first discussed here:

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


Derived from GoogleCloudPlatform/magic-modules#15170

…ling `identity()` (#15170)

[upstream:2acb0efb335689de74cc1532001e19a42e94fc6d]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner September 27, 2025 03:35
@modular-magician modular-magician merged commit 355dffb into hashicorp:FEATURE-BRANCH-resource-identity-generation Sep 27, 2025
3 checks passed
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.

1 participant