-
Notifications
You must be signed in to change notification settings - Fork 258
Document practices for writing Pulumi Policies for Dynamic Providers #16522
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
Conversation
Add comprehensive documentation on how to write policies for dynamic providers, addressing the challenge that all dynamic resources share the same resource type. Include examples in TypeScript and Python that demonstrate property-based filtering to identify specific dynamic providers, along with best practices for authoring such policies. Changes: - Add new section in policy authoring docs with complete examples - Add informational note in dynamic providers docs linking to guidance - Provide best practices for writing robust dynamic provider policies Fixes #14437 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Documentation ReviewI've reviewed the changes in this PR and they look good overall. The documentation provides clear, helpful guidance for writing policies for dynamic providers, which addresses a real gap in the documentation. Positive aspects
Issues foundcontent/docs/iac/concepts/resources/dynamic-providers.md:27 Minor style issue: The note uses the phrase "However, since..." which creates a longer, more complex sentence. Consider breaking this into two sentences for better readability: content/docs/insights/policy/policy-packs/authoring.md:335 In the best practices list items, the formatting uses bold for the key concept followed by a colon. This is good, but consider whether "Identify unique properties" should use "identifying" for consistency with the instructional tone of items 2-4. However, this is a minor stylistic preference and the current version is acceptable. SummaryThe documentation accurately addresses issue #14437 and provides users with the information they need to write effective policies for dynamic providers. The examples are realistic and follow Pulumi coding conventions. The changes adhere to the style guide requirements. Mention me (@claude) if you'd like me to review any revisions or have questions about the feedback. |
|
Your site preview for commit d03ce7b is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-16522-d03ce7ba.s3-website.us-west-2.amazonaws.com. |
CamSoper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, one minor suggestion.
| [Dynamic providers](/docs/iac/concepts/resources/dynamic-providers/) allow you to create custom resource types directly in your Pulumi programs. When writing policies for dynamic providers, you need to account for a key constraint: **all dynamic resources share the same resource type** (`pulumi-nodejs:dynamic:Resource` for TypeScript/JavaScript or `pulumi-python:dynamic:Resource` for Python). | ||
| Since you cannot rely on the resource type alone to identify which dynamic provider a resource uses, you must inspect the resource's properties to differentiate between different dynamic provider implementations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Since you cannot rely on the resource type alone to identify which dynamic provider a resource uses, you must inspect the resource's properties to differentiate between different dynamic provider implementations. | |
| Since you can't rely on the resource type alone to identify which dynamic provider a resource uses, you must inspect the resource's properties to differentiate between different dynamic provider implementations. |
Add comprehensive documentation on how to write policies for dynamic providers, addressing the challenge that all dynamic resources share the same resource type. Include examples in TypeScript and Python that demonstrate property-based filtering to identify specific dynamic providers, along with best practices for authoring such policies.
Changes:
Fixes #14437
🤖 Generated with Claude Code