-
Notifications
You must be signed in to change notification settings - Fork 238
TFECO-9166: Add support for ResourceIdentity#SchemaFunc to allow providers to save RAM #1459
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had some comments about removing Schema
, but that could certainly go in a follow-up PR if you prefer. Will approve since the code itself looks good 👍🏻
@@ -37,6 +37,12 @@ type ResourceIdentity struct { | |||
// previous resource schemas. | |||
Schema map[string]*Schema | |||
|
|||
// SchemaFunc is an optional function that returns the schema for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to just remove Schema
now?
Also, since we'll likely put another alpha out, might make sense to add a changelog describing this breaking change between alphas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if we remove Schema
we should update the comment here to reflect that it's the only way to define an identity schema 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also if we remove Schema
we should update the comment here to reflect that it's the only way to define an identity schema 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #1461
@@ -70,3 +76,18 @@ type ResourceIdentity struct { | |||
// identity schema version data for a managed resource instance. Values must | |||
// align to the typing mentioned above. | |||
type ResourceIdentityUpgradeFunc func(ctx context.Context, rawState map[string]interface{}, meta interface{}) (map[string]interface{}, error) | |||
|
|||
// SchemaMap returns the schema information for this Resource whether it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// SchemaMap returns the schema information for this Resource whether it is | |
// SchemaMap returns the schema information for this resource identity whether it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also same comment here if we remove the Schema
field, to update the pkg comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in #1461
No description provided.