You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This leads to an error: AttributeError: module 'pulumi_kubernetes' has no attribute 'core'.
This inconsistency is unfortunate and, personally, I prefer to use this style when mixing lots of different resource providers (like AWS) since otherwise you end up with pull_secret = Secret(...) or things like pull_secret = v1.Secret(...), which doesn't tell you contextually what's happening.
The other resource packages do this:
for pkg in __all__:
if pkg != 'config':
importlib.import_module(f'{__name__}.{pkg}')
to re-export module names. I realize that dynamic export doesn't work well with MyPy (see pulumi/pulumi#4416) but -- unless this was done intentionally in the Kubernetes package -- I'd vote for just doing it until we have a better story there, so we're consistent across all of our providers.
The text was updated successfully, but these errors were encountered:
It looks like we don't export sub-module names for the Kubernetes provider in Python like we do all other resource providers.
That means this style isn't supported:
This leads to an error:
AttributeError: module 'pulumi_kubernetes' has no attribute 'core'
.This inconsistency is unfortunate and, personally, I prefer to use this style when mixing lots of different resource providers (like AWS) since otherwise you end up with
pull_secret = Secret(...)
or things likepull_secret = v1.Secret(...)
, which doesn't tell you contextually what's happening.The other resource packages do this:
to re-export module names. I realize that dynamic export doesn't work well with MyPy (see pulumi/pulumi#4416) but -- unless this was done intentionally in the Kubernetes package -- I'd vote for just doing it until we have a better story there, so we're consistent across all of our providers.
The text was updated successfully, but these errors were encountered: