is there a way I can debug python starlark ? ipyth...
# python
is there a way I can debug python starlark ? ipython for example or any remote debugging? I would like to know why
is class
and how to convert it to
so I can use it later
I'd start by reading about Inputs, Outputs, and .Apply()
(this does not answer your debugging question but is important to understand when working with pulumi)
Fundamentally, working with the cloud is asynchronous. Many of these values that you see as
are not known at runtime. They become eventually available as cloud resources are created. Because of this, you need to use
to execute callbacks when those resources become available.
creates a new asynchronous future that can be passed as input to another cloud resource. For instance you can create a VPC, and it will have a subnetID output that can be passed as input to create an EC2 instance or virtual machine.
❤️ 1
hmm but is there a terminal where I can see the output for debugging? I'm missing
terraform console
? Here is good ex: lets say I have this decliration `
Copy code
b81_zone = dns.ManagedZone("b81-root", description="Root of", dns_name="", labels={"managed_by": "pulumi"})
and I want to use
but I simply can't get it 😞 The closest that I got is `
Copy code
b81_zone.dns_name.apply(lambda dns_name: dns_name)
but it still returns Output class. I just need a terminal or a way to debug this class
What do you want to use it for? Do you want to consume it from outside the program? If so you can use a stack output
You can also do print statements from within
now I feel dumb because I can't print simple attribute 😞 `
Copy code
print(b81_zone.dns_name.apply(lambda foo: f"{foo}"))
is not working 😞
ok, now I get it 😞
b81_zone.dns_name.apply(lambda c: print(c))