https://pulumi.com logo
#python
Title
# python
w

worried-dress-4788

09/08/2023, 2:24 PM
Hello, I’m new to Pulumi and am struggling with the
Output
usage with my two use-cases which seems rather simple and are probably linked : • Creating an
pulumi_azure_native.resources.ResourceGroup
and accessing it’s name for other resources in a custom
ComponentResource
in the same stack. • Using a
StackReference
, I cannot use exports I’ve made and get their values for other resources to use. I always get the warning about “Calling str on an Output[T] is not supported.” and am lost. Could someone help me figure it out?
b

billowy-army-68599

09/08/2023, 5:27 PM
i don’t see any immediate issues here, what resource is actually throwing the error?
also: the type token in a component resource should be 3
:
not 4
:
- it doesn’t matter really, but we may break that in the future
w

worried-dress-4788

09/11/2023, 2:25 PM
The hardest part is working with
StackReference
, I think I’ve managed to find a solution using
apply()
and a lambda function.
And for the token, you mean
"gd:azure:network:vnet"
in my example right? I’ll look to update this to match the best practice,