This message was deleted.
# automation-api
s
This message was deleted.
l
Inline programs require installing plugins before running the update.
l
I'm doing that actually already:
Copy code
def 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()
I've tried
v4.15.0
,
v4.0.0
, and
4.15.0
as the version. Nothing is working
Welp, actually it's suddently working so I'm not sure what was wrong but I don't need help anymore! 😂 Thank yoU!
👍 1