:wave: Hey everybody, quick question I am trying ...
# general
e
👋 Hey everybody, quick question I am trying to set up Hashicorp Vault in a Docker Swarm, and I would like to have a container that automatically initializes / unseals the vault running as a bash script inside a vault container. These values are only exposed once (on vault initialization), so the container only needs to export those values one time. How can I store those values into the pulumi state to avoid needing to run that container again (because the results would be the same, and would not provide the needed values). I know they can technically be outputs of that resource, but I'm not sure how to prevent that container from running unless it is actually needed (e.g. those values don't exist)
s
I think you can do this with the Command provider: https://www.pulumi.com/registry/packages/command/api-docs/local/command/
It might not be pretty. Maybe... write it to a local file in the container and then bash-fu to get the value?
Or it might be easier than I'm imagining.
e
So the fun part is this is running on a remote docker host
So the container isn't local; which I guess doesn't make a huge difference for the
Command
provider, but it does limit options