11/04/2022, 1:41 AM
Trying to use Automation API to disable the default providers, but the
method doesn't support using a path key?
stack.set_config("pulumi:disable-default-providers[0]", auto.ConfigValue("*"))
Results in a literal config with [0] in its name.. but if I use --path on the cli I can force it to a list of string... is there a more correct way to do this?? setting complex types via automation? is this still relevant, and the value should just be passed in as a json dumps?
I guess subprocessing out to the CLI is the only way -- very disappointing ๐Ÿ˜ž Looks like it could be possible to extend the LocalWorkspace class though and add a
method or something.
@billowy-army-68599 are commits like these, where someone adds these automation API extras, generated, or does each languages' SDK require its own adaptation? Basically, I didn't see any comments about pulumigen in these files, so I wasn't sure how that worked, contributing-wise?


11/04/2022, 3:12 AM
itโ€™s manually authored at the moment


11/04/2022, 4:03 PM
Cool thanks for that clarification Lee. ๐Ÿ‘
@billowy-army-68599 for what it's worth, I found myself making a helper method that did this:
def disable_default_providers(stack: auto.Stack) -> None:
    Runs the pulumi cmd to disable all default providers.
I wonder if it makes sense to open up the
method to be 'public' for custom use-cases where the context of the stack would be beneficial, but there's no built in support for handling some of the CLI components.
Obviously there'd be some warranty here of "here be dragons, and you could break the intended context some how"