many-book-28422
08/29/2024, 9:28 AMstack = auto.select_stack(stack_name=stack_name,
project_name=project_name,
program=pulumi_program,
work_dir=work_dir)
up_res = stack.up(on_output=print, diff=True, suppress_outputs=True, target=targets)
I have a config value in the Pulumi.stack.yaml
file on my local workspace and I’m using s3 as a backend to store state. I understand that the local config is different from stack config and that I have to do something like this in order to set the config value in stack.
suffix = ws.get_config(stack_name=stack_name, key='suffix')
<http://logger.info|logger.info>(f"suffix: {suffix.value}")
if suffix:
stack.set_config(key='suffix', value=ConfigValue(value=suffix.value, secret=False))
<http://logger.info|logger.info>(f"remote val: {stack.get_config(key='suffix').value}")
However, using pulumi.Config().get('suffix')
inside the pulumi_program
function still returns None
I’m not sure if I’m missing something here.