Skip to content
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

Updated SDK docs on output #313

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Updated SDK docs on output #313

wants to merge 1 commit into from

Conversation

pierskarsenbarg
Copy link
Member

The previous version was technically correct in that you shouldn't create resources within an apply function but was incorrect that it is not allowed

The previous version was technically correct in that you shouldn't create resources within an apply function but was incorrect that it is not allowed
@pierskarsenbarg pierskarsenbarg requested a review from a team as a code owner August 6, 2024 10:17
@pierskarsenbarg pierskarsenbarg added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Aug 6, 2024
@pierskarsenbarg
Copy link
Member Author

See also pulumi/pulumi#16885

Copy link
Contributor

@tgummerer tgummerer left a comment

Choose a reason for hiding this comment

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

Sorry about the delay reviewing this.

@@ -496,7 +496,7 @@ public Output<U> Apply<U>(Func<T, Input<U>?> func)
/// name="func"/>. The result remains an <see cref="Output{T}"/> so that dependent resources
/// can be properly tracked.
/// <para/>
/// <paramref name="func"/> is not allowed to make resources.
/// <paramref name="func"/> should not be used to create resources unless necessary. Creating resources within 'func' can cause unknown behaviour.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// <paramref name="func"/> should not be used to create resources unless necessary. Creating resources within 'func' can cause unknown behaviour.
/// <paramref name="func"/> should not be used to create resources unless necessary as `func` may not be run during some program executions.

Let's make it the same as in pulumi/pulumi#16885.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants