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

sdk/py/ComponentResource: Propagate provider to children #12292

Merged
merged 1 commit into from Mar 3, 2023

Commits on Mar 3, 2023

  1. sdk/py/ComponentResource: Propagate provider to children

    It's currently possible in Pulumi to pass a ProviderResource
    as a Provider option to a ComponentResource.
    The ComponentResource will record the Provider for later,
    and propagate it to its child resources.
    This is currently the behavior in [all SDKs except Python][1].
    
      [1]: #12161 (comment)
    
    The reason this didn't work was because in Python's
    providers merging logic, we use the incorrect package name
    when saving the provider.
    Instead of using the package name reported by the provider,
    we were using the package name of the current resource
    (the ComponentResource in this case).
    
    To fix this, verify that the package name of the provider
    matches the package name of the resource we're building.
    If it doesn't, we will still save the provider
    for child resources.
    
    Resolves #12161
    abhinav committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    db4c071 View commit details
    Browse the repository at this point in the history