late-chef-72896
03/05/2024, 2:40 PMlively-crayon-44649
03/05/2024, 3:07 PMPulumi.<stack>.yaml
etc., you have a few options. From the CLI/scripts, pulumi config set [--path] [--secret]
will help. In code, Pulumi Automation's Stack
will let you setAllConfig
, etc. Inside a stack itself, you can only read config (AFAIK) -- updating in a stack would (I imagine) potentially lead to edge cases where Pulumi can't reach stability on what the desired state should be.late-chef-72896
03/05/2024, 3:09 PMsparse-gold-10561
03/05/2024, 8:36 PM# Create our stack using a local program in the work_dir
print("initializing stack...")
stack = pulumi.automation.create_or_select_stack(
stack_name=stack_name_fqdn, work_dir=PULUMI_WORK_DIR
)
print("setting up stack config...")
stack.set_config("aws:region", pulumi.automation.ConfigValue(value=region))
stack.set_config(
"aws:skipCredentialsValidation", pulumi.automation.ConfigValue(value="true")
)
stack.set_config(
"aws:skipMetadataApiCheck", pulumi.automation.ConfigValue(value="false")
)
stack.set_config(
"aws:assumeRole",
pulumi.automation.ConfigValue(
json.dumps(
{
"roleArn": "arn:aws:iam::xxxx:role/iac/gitlab/deployment-job",
"sessionName": "gitlab-deployment",
}
)
),
)
which creates our stack config files dynamicallyNo 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