salmon-motherboard-78006
09/14/2022, 8:36 PMpulumi,export
statements in stack A.
Now, I have pulumi.StackReference
in stack B to reference the export statements of stack A.
Is it possible?stocky-restaurant-98004
09/14/2022, 8:38 PMStackReference
is for!salmon-motherboard-78006
09/14/2022, 8:39 PMstreams_stack = pulumi.StackReference(
config.require("stack-A")
)
print(streams_stack.outputs.__dict__.__getitem__("arn"))
stocky-restaurant-98004
09/14/2022, 8:42 PMconfig = pulumi.Config()
stack = pulumi.get_stack()
org = config.require("org")
stack_ref = pulumi.StackReference(
f"{org}/aws-cloudwan-workshop-cloudwan/{stack}")
core_network_id = stack_ref.get_output("core_network_id")
salmon-motherboard-78006
09/14/2022, 8:50 PMpulumi.export('stream_a',
{"arn": stream_a.arn, "name": stream_a.name, "alias": data_kinesis_kms_alias.name})
I’m trying to do `get_output(“stream_a)Calling __str__ on an Output[T] is not supported.
To get the value of an Output[T] as an Output[str] consider:
1. o.apply(lambda v: f"prefix{v}suffix")
See <https://pulumi.io/help/outputs> for more details.
This function may throw in a future version of Pulumi.
pulumi preview
?apply
and place the whole policy inside the lambda…stocky-restaurant-98004
09/17/2022, 2:22 PM