sparse-intern-71089
09/11/2020, 7:08 PMworried-city-86458
09/11/2020, 7:09 PMworried-city-86458
09/11/2020, 7:09 PMworried-city-86458
09/11/2020, 7:14 PMworried-city-86458
09/11/2020, 7:16 PMlemon-agent-27707
09/11/2020, 7:24 PMworried-city-86458
09/11/2020, 7:40 PMlemon-agent-27707
09/11/2020, 7:45 PMLocalWorkspace
is designed around the CLI, but the underlying Workspace
interface makes no assumptions around where config comes from. I could imagine writing InMemoryWorkspace
, SQLBackedWorkspace
, etc.lemon-agent-27707
09/11/2020, 7:46 PMworried-city-86458
09/11/2020, 7:47 PMworried-city-86458
09/11/2020, 7:50 PMworried-city-86458
09/11/2020, 10:16 PMworried-city-86458
09/11/2020, 10:17 PMpublic static class Program
{
public static Task<int> Main()
{
// TODO write Pulumi.<env>.yaml
return Deployment.RunAsync<AwsStack>();
}
}
lemon-agent-27707
09/11/2020, 10:18 PMworried-city-86458
09/11/2020, 10:43 PMPULUMI_CONFIG
env var with my own json config! Specifically, I could overwrite it in Program.Main
before calling Deployment.RunAsync
.
That would be a nice workaround if such a change was acceptable. What do you think?lemon-agent-27707
09/11/2020, 10:52 PMworried-city-86458
09/11/2020, 10:53 PMAllConfig
property is changed to use Lazy<T>
, so I'd need some buyin...worried-city-86458
09/11/2020, 10:54 PMlemon-agent-27707
09/11/2020, 11:00 PMworried-city-86458
09/11/2020, 11:03 PMworried-city-86458
09/13/2020, 2:49 AMpublic static class Program
{
public static Task<int> Main(string[] args)
{
var configJson = Environment.GetEnvironmentVariable("PULUMI_CONFIG");
var config = JsonSerializer.Deserialize<IDictionary<string, string>>(configJson);
config["infra:injected"] = "value";
configJson = JsonSerializer.Serialize(config);
Environment.SetEnvironmentVariable("PULUMI_CONFIG", configJson);
return Deployment.RunAsync<AwsStack>();
}
}
I can see the test value does actually get injected into Deployment.AllConfig
, however it's not reflected in the Pulumi web UI, which implies there's more devil in the details.bored-activity-40468
10/14/2020, 7:48 PMworried-city-86458
10/14/2020, 7:51 PM