Hello yet again! :slightly_smiling_face: I want to...
# automation-api
Hello yet again! 🙂 I want to save my stack exports as values / strings in DynamoDB, but I'm unsure how to refer to my outputs. I am exporting values and see them as Outputs, but I don't knw how to access them to save them outside of the stack.
Copy code
artifact_bucket_name      : "12345-dev-codebuild-artifacts"
asg_name                  : "12345-dev"
etc ...
If you're getting at them via a script after the program has finished, you can use
pulumi stack output
, and optionally add the
flag if that's helpful.
If you're getting at them inside your automation-api program, after
has completed, then you can use the
method of the stack.
@little-cartoon-10569 Do you have the documentation for that by chance (python)?
Looking now... Python docs are woeful. Strongly recommend using Typescript, if only for the docs...
Hmm.. link says "LocalWorkspace"... that's concerning.
Ah, here's the link to the version for non-local workspaces: https://www.pulumi.com/docs/reference/pkg/python/pulumi/#pulumi.automation.Stack.outputs
Thank you! 🙂
👍 1
@little-cartoon-10569 I'm getting this error where it looks like its a dict, but when I go to add it to DynamoDB, I'm getting this error:
[ERROR] TypeError: Unsupported type "<class 'pulumi.automation._output.OutputValue'>" for value "'12345-dev-codebuild-artifacts'"
It's like as a whole the type is a dict, but each individual value is a pulumi output still and not just a string. Any thoughts? Would an apply be appropriate...?
Yes, you might need to use apply. Add things to DynamoDB from inside a loop of applies.