From 3b399b5ad1d15645d218609f283c6dccaa8e1cfd Mon Sep 17 00:00:00 2001 From: CalebTVanDyke Date: Fri, 1 Dec 2023 15:34:16 -0600 Subject: [PATCH] add cloud console url to pulumi outputs --- buildflow/core/infra/buildflow_resource.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/buildflow/core/infra/buildflow_resource.py b/buildflow/core/infra/buildflow_resource.py index 27acabc8..f3bb510a 100644 --- a/buildflow/core/infra/buildflow_resource.py +++ b/buildflow/core/infra/buildflow_resource.py @@ -23,9 +23,11 @@ def __init__( self.primitive = primitive self.child_resources = primitive.pulumi_resources(credentials, opts=opts) - self.register_outputs( - { - "primitive_id": primitive.primitive_id(), - "primitive_type": type(primitive).__name__, - } - ) + outputs = { + "primitive_id": self.primitive.primitive_id(), + "primitive_type": type(self.primitive).__name__, + } + cloud_console_url = self.primitive.cloud_console_url() + if cloud_console_url is not None: + outputs["cloud_console_url"] = cloud_console_url + self.register_outputs(outputs)