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.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by