dry-keyboard-94795
12/02/2022, 3:13 PM.get()
outputs or Stackreferences, how safe would something like this be (which does work for k8s `ConfigMap.get()`:
import typing
import pulumi
from pulumi.runtime.sync_await import _sync_await
T_co = typing.TypeVar("T_co", covariant=True)
def extract(o: pulumi.Output[T_co]) -> T_co:
if not _sync_await(o.is_known()):
raise RuntimeError("Output is not known yet")
return _sync_await(o.future())
(using the hidden _sync_await
for convenience to lift out an awaitable)python-kubernetes
for it, though this requires us to have an external kubeconfig already setup)