Skip to content
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

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Conversation

paddycarver
Copy link
Contributor

Port the functionality added in hashicorp/terraform#22583 that allows
providers to receive arbitrary, provider-definable module-scoped
information from configs.

Port the functionality added in hashicorp/terraform#22583 that allows
providers to receive arbitrary, provider-definable module-scoped
information from configs.
@paddycarver paddycarver added enhancement New feature or request protocol-5-only labels Apr 23, 2020
@paddycarver paddycarver added this to the v2.0.0 milestone Apr 23, 2020
@paddycarver paddycarver requested a review from a team April 23, 2020 18:14
Copy link
Contributor

@appilon appilon left a 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 {
Copy link
Contributor

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?

Copy link
Contributor

@appilon appilon Apr 27, 2020

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.

Copy link
Contributor Author

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.

@paddycarver paddycarver merged commit d992533 into master Apr 28, 2020
@paddycarver paddycarver deleted the paddy_provider_meta branch April 28, 2020 18:30
@ghost
Copy link

ghost commented May 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants