-
Notifications
You must be signed in to change notification settings - Fork 230
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
Port provider_meta functionality from core. #405
Conversation
Port the functionality added in hashicorp/terraform#22583 that allows providers to receive arbitrary, provider-definable module-scoped information from configs.
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.
overall lgtm
@@ -330,6 +330,10 @@ func (r *Resource) Apply( | |||
return s, append(diags, diag.FromErr(err)) | |||
} | |||
|
|||
if s != nil && data != nil { |
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.
Assuming its okay for these to be nil in certain situations? No need for logging warnings or panicking?
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.
I suppose in the context of provider meta feature being an entirely optional feature sanity checking nil like this is safe and we don't really need to think about why something might be nil, the rest of the SDK should concern itself with that, not this feature.
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.
In most cases, this will be nil. This will only be non-nil when a provider_meta block is set for this provider.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Port the functionality added in hashicorp/terraform#22583 that allows
providers to receive arbitrary, provider-definable module-scoped
information from configs.