https://pulumi.com logo
#getting-started
Title
# getting-started
c

clever-glass-42863

04/04/2022, 9:57 PM
What's the best way to handle passing custom arguments from the
pulumi up
command into the dotnet Program itself? Are all the extra command line arguments passed through passively? Or will we need to do something else to do that; for example just rely on environment variables.
Copy code
internal class Program
    {
        static Task<int> Main() 
        {
            // I want to parse command-line args here, but does pulumi up pass them through?
            // Or just use Environment variables?
            return Deployment.RunAsync<MyCoolStack>();
        }
    }
b

billowy-army-68599

04/04/2022, 10:01 PM
@clever-glass-42863 if you want custom values into pulumi, you want: https://www.pulumi.com/docs/intro/concepts/config/ if you want specifically to pass custom cli args (not something the pulumi cli supports) you want https://www.pulumi.com/docs/guides/automation-api/
1
c

clever-glass-42863

04/05/2022, 2:01 PM
Thanks
4 Views