clever-glass-42863
02/12/2022, 12:04 AMEnvs = new Input<string>[]
{
// Analytics DB...
"ANALYTICS_DB_USERNAME=postgres",
"ANALYTICS_DB_PASSWORD=password",
analyticsPostgresHostname,
// Accounts DB...
"ACCOUNTS_DB_USERNAME=postgres",
"ACCOUNTS_DB_PASSWORD=password",
accountsPostgresHostname,
"ACCOUNTS_DB_PORT=5432",
"ANALYTICS_DB_PORT=5431",
"PORT=80"
},
Where both the analyticsPostgresHostname
and accountsPostgresHostname
are defined like:
var accountsPostgresHostname = accountsPostgresContainer.Hostname.Apply(networkName => $"ACCOUNTS_DB_HOSTNAME={networkName}");
var analyticsPostgresHostname = analyticsPostgresContainer.Hostname.Apply(networkName => $"ANALYTICS_DB_HOSTNAME={networkName}");
However, only one of those hostnames actually get filled, the other is an empty string. Is it expected that both those Output<string> be resolved in that Input<string>[]? I appreciate your time!echoing-dinner-19531
02/12/2022, 10:40 AMclever-glass-42863
02/12/2022, 2:29 PMechoing-dinner-19531
02/12/2022, 6:35 PMpulumi stack export
to see if the output value is filled in for the resource.clever-glass-42863
02/12/2022, 7:47 PMpulumi stack export
we can see that Apply call is being made, yet networkName is null. See this output from that variable:
"ACCOUNTS_DB_HOSTNAME=",
That would only be set if the Apply call was invoked, yet the value should come from the parameter being fed in via the Apply:
var accountsPostgresHostname = accountsPostgresContainer.Hostname.Apply(networkName => $"ACCOUNTS_DB_HOSTNAME={networkName}");
pulumi rm
the entire stack and recreate locally for this to work as expected. Not sure what state the local containers go into (considering they were being recreated) however after doing so, both hostnames populate as expected.echoing-dinner-19531
02/12/2022, 8:52 PM