This message was deleted.
# getting-started
s
This message was deleted.
b
have you tried using an
apply
?
m
Yes that doesn’t seem to work either because you can get the plaintext value inside apply (i.e.
.apply(x => console.log(x)
) but I can’t seem to extract the value (i.e.
pgContainer.networkDatas[0].gateway.apply(x => x)
has the type Output<T> and the apiContainer won’t create because it errors out)
a
This typechecks for me:
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";

const pgContainer = new docker.Container("postgres-container", {
  image: "pg-image",
});
const apiContainer = new docker.Container("api-container", {
  image: "api-image",
  envs: [pulumi.interpolate`DB_HOST=${pgContainer.networkDatas[0].gateway}`],
});