pulumi/pkg/engine
Ian Wahbe 33f9c7a1ea
Allow disabling default providers (#8829)
* Allow disabling default providers

This is done with an opt-in setting in `pulumi config`. For example, to
disable default providers for `aws`, use:

```sh
pulumi config set --path pulumi:disable-default-providers[0] aws
```

To add `kubernetes` to the disabled list, use
```sh
pulumi config set --path pulumi:disable-default-providers[1] kubernetes
```

To disable all default providers, `*` can be used.

---

Under the hood, whenever we handle a default provider request (with
`defaultProviders.handleRequest`), we make sure it isn't on the deny
list. If it is, we replace the requested reference with a special
`DenyDefaultProvider` reference. We check for this reference whenever we
are about to get a provider to do actual work. By intercepting denied
providers when references are created, we ensure that we never use a
denied provider.

* Update CHANGELOG_PENDING.md

* Fix lints

The lint errors appear to be unrelated to the original PR. Fixing them
unblocks the CI.

* Add engine tests

* Fix nits

* Clarify function
2022-01-26 18:08:36 +01:00
..
lifeycletest Allow disabling default providers (#8829) 2022-01-26 18:08:36 +01:00
deployment.go Pipe serverURL through register resource (#8544) 2021-12-17 14:52:01 -08:00
destroy.go Clone snapshot before testing with it (#8551) 2021-12-09 09:09:48 +00:00
diff.go Bold in-progress diffs diffrently (#7918) 2021-09-28 15:16:09 -07:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
engine.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
errors.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
events.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
eventsink.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
import.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
journal.go Update error handling (#8406) 2021-11-12 18:37:17 -08:00
plugin_host.go Update error handling (#8406) 2021-11-12 18:37:17 -08:00
plugins.go Pipe serverURL through register resource (#8544) 2021-12-17 14:52:01 -08:00
plugins_test.go Pipe serverURL through register resource (#8544) 2021-12-17 14:52:01 -08:00
project.go Update error handling (#8406) 2021-11-12 18:37:17 -08:00
query.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
refresh.go Respect provider aliases (#7166) 2021-07-28 12:12:53 -07:00
snapshot.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
update.go Pipe serverURL through register resource (#8544) 2021-12-17 14:52:01 -08:00
update_test.go Toward replacing MSBuild with make+bash on Windows (#8617) 2022-01-07 22:27:14 -05:00