You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO:ResourceIdentity: Now you can reasonably import using just the identity field and no state. However this still feels like not a great idea, because it's possible
197
-
// to import via ID with a client that doesn't support identity, so the "Read" logic for providers will always have to account for both scenarios.
198
-
//
199
-
// A potential improvement on this could be to check if identity AND state are empty. That is the only true error state because then no data would be transferred from import to read.
196
+
// If we are importing by ID, we should ensure that something in the import stub state has been populated,
197
+
// otherwise the resource doesn't actually support import, which is a provider issue.
"An unexpected error was encountered when creating the import response. New identity data was returned by the provider import operation, but the resource does not indicate identity support.\n\n"+
493
+
"This is always a problem with the provider and should be reported to the provider developer.",
// TODO:ResourceIdentity: Should we implement another pass-through? called like ImportStatePassthrough that would work "better" with both ID and Identity
117
-
//
118
-
// We need to decide how we want to handle "existing id" string fields that need to be set to state when an identity is provided.
119
-
// Perhaps we can look at the identity schema and automatically use those values to set state? If we did that, we should probably rename this function
120
-
// since it's doing much more than just passing through ID. We wouldn't rename it, maybe just deprecate/create a new function.
121
-
//
122
-
// Since providers will likely be supporting versions of Terraform that don't support identity, they will likely won't want to write multiple ways of reading
123
-
// (read with identity, read with state "id" field)
0 commit comments