From bc29ad91dbcf1432c31eaabd71f17c3982df6083 Mon Sep 17 00:00:00 2001 From: Thomas Meckel Date: Sat, 6 Jul 2024 15:14:47 +0000 Subject: [PATCH] refactor: using default provider instance for Pulumi Docker in stack/cloud_run_images.py --- stack/cloud_run_images.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/stack/cloud_run_images.py b/stack/cloud_run_images.py index 1b243efe..19cf9b17 100644 --- a/stack/cloud_run_images.py +++ b/stack/cloud_run_images.py @@ -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, + ], )