Skip to content

Commit

Permalink
refactor: using default provider instance for Pulumi Docker in stack/…
Browse files Browse the repository at this point in the history
…cloud_run_images.py
  • Loading branch information
tmeckel committed Jul 6, 2024
1 parent 1203a95 commit bc29ad9
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions stack/cloud_run_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,54 +13,48 @@ def construct_name_images(resource_name: str) -> str:
return f"{project}-images-{stack}-{resource_name}"


gcr_docker_provider = docker.Provider(
construct_name_images("gcr"), registry_auth=[dict(address="gcr.io")]
)


cloud_run_offset_tile_registry_image = docker.get_registry_image(
name=gcp.container.get_registry_image(
name=construct_name_images("cloud-run-offset-tile-image:latest"),
).image_url,
opts=pulumi.InvokeOptions(
provider=gcr_docker_provider,
),
)

cloud_run_orchestrator_registry_image = docker.get_registry_image(
name=gcp.container.get_registry_image(
name=construct_name_images("cloud-run-orchestrator-image:latest"),
).image_url,
opts=pulumi.InvokeOptions(
provider=gcr_docker_provider,
),
)

cloud_run_tipg_registry_image = docker.get_registry_image(
name=gcp.container.get_registry_image(
name=construct_name_images("cloud-run-tipg-image:latest"),
).image_url,
opts=pulumi.InvokeOptions(
provider=gcr_docker_provider,
),
)


cloud_run_offset_tile_image = docker.RemoteImage(
construct_name_images("remote-offset"),
name=cloud_run_offset_tile_registry_image.name,
pull_triggers=[cloud_run_offset_tile_registry_image.sha256_digest],
pull_triggers=[
cloud_run_offset_tile_registry_image.sha256_digest,
],
)


cloud_run_orchestrator_image = docker.RemoteImage(
construct_name_images("remote-orchestrator"),
name=cloud_run_orchestrator_registry_image.name,
pull_triggers=[cloud_run_orchestrator_registry_image.sha256_digest],
pull_triggers=[
cloud_run_orchestrator_registry_image.sha256_digest,
],
)

cloud_run_tipg_image = docker.RemoteImage(
construct_name_images("remote-tipg"),
name=cloud_run_tipg_registry_image.name,
pull_triggers=[cloud_run_tipg_registry_image.sha256_digest],
pull_triggers=[
cloud_run_tipg_registry_image.sha256_digest,
],
)


Expand Down

0 comments on commit bc29ad9

Please sign in to comment.