This message was deleted.
# automation-api
s
This message was deleted.
l
1. Go does not support top level programs and all programs must execute inside
pulumi.Run()
this is not true for python. You should just be able to create a function that creates your resources and call that function from within both your automation api program and your CLI program 2. Not sure I fully understand. Would you mind providing a little more detail? With Automation API you can run any code you want as a part of the automation program. You can read config from a shared stack, set config/secrets on the current stack programmatically, and even do things like read values from AWS KMS or Azure Key Vault.
h
1. Got it, thanks! 2. Assuming this is the best way to go about this:
Copy code
base_stack = auto.select_stack(
        stack_name=base_stack_name,
        work_dir=str(work_dir),
)
base_config_all = base_stack.get_all_config()

new_config_all = ### MUTATE MAP
new_stack.set_all_config(new_config_all)
Do we have any high level functions for mutating ConfigMap/ConfigValue?
l
Do we have any high level functions for mutating ConfigMap/ConfigValue?
no