Skip to content

StackReference getOutputDetails example is misleading #13855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joeduffy opened this issue Jan 20, 2025 · 0 comments
Open

StackReference getOutputDetails example is misleading #13855

joeduffy opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec product/iac Docs issues for the IaC product

Comments

@joeduffy
Copy link
Member

The StackReference docs for getOutputDetails seem wrong/misleading.

Namely, this part:

On the other hand, as an example of using getOutputDetails, suppose that your referenced stack creates a VPC and exports a list of public subnets as a JSON-serialized string, and you want to add a bastion host to each subnet.

This is not what I'm seeing. If I export an array of subnet IDs from my program, and then fetch them in another stack with getOutputDetails, I get back an array, not a string. I was misled into assuming getOutputDetails would simply return those as a string, but it seems to automatically parse them.

After re-reading the docs, I see that it says "exports a list of public subnets as a JSON-serialized string"; so I guess they docs aren't technically incorrect. However, (a) most people wouldn't go out of their way to JSON serialize their stack outputs (they'd just output them) and (b) we should make it clear that if you export structured objects, their type will automatically round trip without you needing to do anything.

(Assuming that is correct -- given the docs, I am not sure!)

I am also unsure if this is true universally across all supported languages. I would hope so.

@joeduffy joeduffy added the needs-triage Needs attention from the triage team label Jan 20, 2025
@github-project-automation github-project-automation bot moved this to 🤔 Triage in Docs 📚 Jan 20, 2025
@interurban interurban added area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec labels Jan 21, 2025
@interurban interurban moved this from 🤔 Triage to 🧳 Backlog in Docs 📚 Jan 21, 2025
@interurban interurban removed the needs-triage Needs attention from the triage team label Jan 21, 2025
@interurban interurban added this to the 0.115 milestone Jan 22, 2025
@interurban interurban assigned interurban and thoward and unassigned interurban Jan 22, 2025
@meagancojocar meagancojocar added the product/iac Docs issues for the IaC product label Jan 24, 2025
@interurban interurban modified the milestones: 0.115, 0.116 Jan 28, 2025
@thoward thoward removed this from the 0.116 milestone Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Improvements or additions to documentation kind/bug Some behavior is incorrect or out of spec product/iac Docs issues for the IaC product
Projects
Status: 🧳 Backlog
Development

No branches or pull requests

4 participants