https://pulumi.com logo
#python
Title
# python
Something seems to work better wrapping the creation of the
flask_image
in an apply statement:
Copy code
flask_image = gatheredDBOutput.apply(lambda args:
    docker.Image("flask-dockerimage",
        image_name=app_ecr_repo_repository_url,
        build=docker.DockerBuild(
            context="./frontend",
            args=dict(
                db_host_address = args[0],
                db_host_port = args[1],
                db_name = args[2],
                db_user = db_user,
                db_pwd = db_pwd
            )
        ),
        skip_push=False,
        registry=app_registry
    )
)
I thought I saw a warning about creating resources within an
apply
statement since it’s a callback and funky things can happen when
pulumi preview
runs if this structure is used.