proud-tomato-75820
06/23/2022, 7:59 AMconst secret = new k8s.core.v1.Secret("example", {
metadata: {
name: "example",
annotations: {
"<http://kubernetes.io/service-account.name|kubernetes.io/service-account.name>": "default",
},
},
type: "<http://kubernetes.io/service-account-token|kubernetes.io/service-account-token>",
});
which works. But now how do I get the token since data is undefined? secret.data.apply(v => v["token"]);
🤔quiet-wolf-18467
proud-tomato-75820
06/23/2022, 1:26 PMquiet-wolf-18467
proud-tomato-75820
06/23/2022, 1:53 PMthere’s no guarantees when the token will be addedactually, it’s immediate so it’s enough to fetch resource from API - for example this works in terraform because they always read created resource😅 So i was wondering if it’s possible to do some refresh or something similar also here. But yeah, gonna give a shot to kube client. Thank you :)
gorgeous-egg-16927
06/23/2022, 3:12 PMpulumi refresh
after the creation, but I can’t think of a way to do this in one step currently.
Here’s the issue tracking this class of problems: https://github.com/pulumi/pulumi-kubernetes/issues/1260