:wave: what’s the typescript equivalent of the CLI...
# typescript
👋 what’s the typescript equivalent of the CLI command?
Copy code
pulumi config set thing:setting <value>
Not sure it’s idiomatic, but you could look at `pulumi.runtime.setConfig`: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/runtime/#setConfig
@prehistoric-london-9917, I think I have a bit of a chicken and egg problem. I’m spinning up an aws fargate service and aws loadbalancer. I then spin up a Hashicorp Vault Token resource, and that’s the resource that’s always failing because it needs that config value set. However the value needs to come from the result of the loadbalancer’s endpoint value. I programmed the token resource to be dependent on the loadbalancer resource and I also call pulumi.all().apply() on the loadbalancer resource and inside the apply I call setConfig(). However the invocation of the apply call isn’t happening until it’s too late. I may try and jam spinning up the token resource inside that apply but ugh…
@helpful-easter-62786 it kinda sounds like you might need two different stacks here, you could probably orchestrate them with automation api so it happens in a single invocation of a script. Or else the vault resource should just take the config setting directly from the load balancer endpoint output rather than relying on an external config setting.
If it's the vault provider that needs to config setting you might be able to set it directly in the provider object
@helpful-easter-62786 I had a similar problem with Pulumi thinking LB resources were ready when they weren’t all the way. This was discussed previously here, but I think the thread was cut off from the archive. To solve it, I used
and simply waited for the
function to return a result. In my case, I was creating a Route 53 record, but you could also use it in your use case of starting up a Hashicorp Vault resource. Mine was also in an
based on a Kubernetes Ingress resource, but could just as easily be any other resource.