pulumi/sdk/python
Sean Gillespie a37b3d89e3
Implement first-class providers for Python (#2335)
* Implement first-class providers for Python

First-class providers are an explicit projection of providers themselves
into Pulumi programs. For the most post, providers are just regular
resources, but the addition of providers to the fray (and the ability of
resources to be constructed by providers in the same program) requires
some changes to the Python resource model.

A summary of the changes:

1. Added ProviderResource, a custom resource that is the base class of
all providers.
2. ResourceOptions now has 'provider' and 'providers' fields.
'provider', when passed to a custom resource, allows users to override
the provider that is used to construct a resource to an instance of a
ProviderResource. 'providers', when passed to a component resource,
allows users to override providers used to construct children of the
component resource.
3. 'protect', 'providers', and 'provider' are all now inherited from
a resource's parent if they aren't specified in the child.

This commit adds the requisite code for the above changes and, in
addition, adds a number of new tests that exercise them and related code
paths.

* Rebase against master
2019-01-04 15:44:27 -08:00
..
cmd Flush stdout and stderr on abnormal lang shutdown (#2226) 2018-11-19 17:59:01 -05:00
lib Implement first-class providers for Python (#2335) 2019-01-04 15:44:27 -08:00
pkg/version Add license headers 2018-05-22 15:02:47 -07:00
.gitignore Implement Output for Python (#2107) 2018-10-26 14:52:30 -07:00
.pylintrc Implement first-class providers for Python (#2335) 2019-01-04 15:44:27 -08:00
Makefile Adopt golangci-lint and address issues 2018-11-08 14:11:47 -08:00
Pipfile Several gardening tasks for Python (#2145) 2018-11-01 12:58:45 -07:00
Pipfile.lock Several gardening tasks for Python (#2145) 2018-11-01 12:58:45 -07:00