hi, I am looking for an easy way to get the curren...
# python
g
hi, I am looking for an easy way to get the current state of a deployment directly from python code. Right now I use a quick and dirty trick by running
pulumi stack export
command and extracting the relevant info from the JSON data:
Copy code
jq = local["/usr/local/bin/jq"]
    pulumi = local["pulumi"]

    chain = pulumi["stack", "export"] | jq['.deployment.resources[] | select(.type == "pulumi:pulumi:Stack") | .outputs.netcams']
    netcams = json.loads(chain())
Should I wait for the python implementation of the Automation API? 😎
r
This is going to be really exiting ..... can't wait for the Python Automation API implementation 😁