sparse-intern-71089
08/16/2021, 3:59 PMlemon-agent-27707
08/16/2021, 5:18 PMlemon-agent-27707
08/16/2021, 5:19 PMlemon-dog-29241
08/16/2021, 5:23 PMdef launch_shared_stack(event, context):
project_name = f"buildbot-shared-{event['org_id']}"
stack_name = "dev"
print(stack_name)
os.environ['PULUMI_CONFIG_PASSPHRASE'] = f'{project_name}{stack_name}'
os.environ['PULUMI_HOME'] = '/tmp'
project_settings = auto.ProjectSettings(
name=project_name,
runtime="python",
backend=auto.ProjectBackend(url=f"<s3://pulumi-state-1234567899875f/shared>"))
stack = auto.create_or_select_stack(stack_name=stack_name,
project_name=project_name,
program=sharedstack.handler,
opts=auto.LocalWorkspaceOptions(project_settings=project_settings))
print("successfully initialized stack")
# for inline programs, we must manage plugins ourselves
print("installing plugins...")
stack.workspace.install_plugin("aws", "v4.15.0")
print("plugins installed")
# set stack configuration specifying the AWS region to deploy
print("setting up config")
# These will come from the event.
stack.set_config("aws:region", auto.ConfigValue(value=event['region']))
stack.set_config("repos", auto.ConfigValue(value=event['repos']))
stack.set_config("org_id", auto.ConfigValue(value=event['org_id']))
print("config set")
print("refreshing stack...")
stack.refresh(on_output=print)
print("refresh complete")
print("updating stack...")
up_res = stack.up(on_output=print)
print(f"Success!")
stack.export_stack()
lemon-dog-29241
08/16/2021, 5:24 PMv4.15.0
, v4.0.0
, and 4.15.0
as the version. Nothing is workinglemon-dog-29241
08/16/2021, 5:28 PM