Skip to content

docs(get-functions): add warning about resource lookup failures#18269

Open
pierskarsenbarg wants to merge 3 commits intomasterfrom
add-warning-get-function
Open

docs(get-functions): add warning about resource lookup failures#18269
pierskarsenbarg wants to merge 3 commits intomasterfrom
add-warning-get-function

Conversation

@pierskarsenbarg
Copy link
Copy Markdown
Member

Summary

  • Improved wording in the closing note of the get-functions example
  • Added a warning callout explaining that Pulumi throws an exception if the looked-up resource does not exist

Test plan

  • Verify the warning callout renders correctly on the get-functions page

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 30, 2026

Docs Review

Scope: content/docs/iac/concepts/functions/get-functions.md (1 file, +5/−1)

This is a clean, well-scoped change. Two minor suggestions:

Suggestions

  1. Line 152 — Consider being slightly more specific about what "does not exist" means in this context. A reader may wonder whether this applies at plan time, update time, or both. For example:

    If the resource you are trying to look up does not exist in your cloud provider account, Pulumi will throw an exception and the program will terminate.
    
  2. Line 152 — "will throw an exception and the program will terminate" — since Pulumi supports multiple languages, "throw an exception" is accurate for most but not all (e.g., Go uses errors, not exceptions). A more language-neutral phrasing could be:

    If the resource you are trying to look up does not exist, Pulumi will report an error and the program will fail.
    

    This is a minor nitpick — the current wording is acceptable given that most Pulumi languages do use exceptions.

What looks good

  • The {{% notes type="warning" %}} shortcode is used correctly.
  • The rewording from "Note that Pulumi" to "In the example above, Pulumi" is a nice improvement — it ties the statement back to the code block.
  • File ends with a newline.
  • No spelling or grammar issues.

No blocking issues. This is ready to merge as-is, though the suggestions above could improve clarity.


Mention @claude if you'd like additional reviews or help with changes.

@pulumi-bot
Copy link
Copy Markdown
Collaborator

@pierskarsenbarg
Copy link
Copy Markdown
Member Author

@claude review changes

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 30, 2026

Claude finished @pierskarsenbarg's task in 41s —— View job


Docs Review

  • Read the changed file
  • Analyze the diff
  • Post review feedback

File: content/docs/iac/concepts/functions/get-functions.md (+5/−1)

This is a clean, well-scoped change. Here's what I found:

What looks good

  • The {{% notes type="warning" %}} shortcode is used correctly per the docs conventions.
  • The rewording from "Note that Pulumi" → "In the example above, Pulumi" is a nice improvement — it anchors the statement to the preceding code block.
  • Warning text uses language-neutral phrasing ("report an error and the program will fail") rather than language-specific terms like "throw an exception" — good call given Pulumi supports Go, Python, TypeScript, Java, and .NET.
  • File ends with a newline (\n after {{% /notes %}}).
  • No spelling or grammar issues.

Minor suggestions

  1. Line 149 — "will never attempt to modify the security group" could be slightly clearer with "in this example" restored, since the statement is about the example's behavior, not a universal guarantee:

    In the example above, Pulumi will never attempt to modify the security group in this example.

    Actually, "in this example" is redundant with "In the example above" — the current wording is fine as-is.

  2. Line 152 — The warning is accurate, but adding context about when this occurs (at runtime, not at preview) could help readers understand the impact:

    If the resource you are trying to look up does not exist, Pulumi will report an error and the operation will fail.
    

    ("the operation will fail" is slightly more precise than "the program will fail" — it applies to both pulumi up and pulumi preview.) This is a very minor nitpick.

Summary

No blocking issues. This PR is in good shape and ready to merge.


@pulumi-bot
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Contributor

@stooj stooj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@stooj
Copy link
Copy Markdown
Contributor

stooj commented Mar 30, 2026

A counter-nitpick: I preferred your original wording because it hints at a possible way of dealing with the error but that would probably need more explanation about the caveats of handling exceptions.

@pulumi-bot
Copy link
Copy Markdown
Collaborator

Your site preview for commit 0c62c88 is ready! 🎉

http://www-testing-pulumi-docs-origin-pr-18269-0c62c88a.s3-website.us-west-2.amazonaws.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants