docs(postgres): restore IaC guides (Terraform, Pulumi, Alchemy)#7566
docs(postgres): restore IaC guides (Terraform, Pulumi, Alchemy)#7566AmanVarshney01 merged 11 commits intomainfrom
Conversation
Re-adds the Infrastructure as Code guides that were lost during the docs restructure. Includes guides for Terraform, Pulumi, and Alchemy, along with a section index and updated postgres meta.json.
WalkthroughAdds a new "Infrastructure as Code" subsection for Prisma Postgres with three provider guides (Terraform, Pulumi, Alchemy), introduces an IaC meta file and navigation entries, and updates the docs spellcheck vocabulary with a few provider-related words. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/content/docs/postgres/iac/pulumi.mdx`:
- Line 37: The internal link
"/postgres/introduction/management-api#service-tokens" in the line containing "A
Prisma service token (see ...)" is broken; update that anchor to the current
Management API page path/anchor (replace the href portion only) so the link
points to the correct Management API doc and specific "service tokens" section;
search for the exact string
"/postgres/introduction/management-api#service-tokens" to locate and replace it
with the new path/anchor used by the docs site.
In `@apps/docs/content/docs/postgres/iac/terraform.mdx`:
- Line 44: Replace the broken internal link
`/postgres/introduction/management-api#service-tokens` with the correct path
`/management-api/authentication#service-tokens` in the IaC docs; specifically
update the link text in the files where it appears
(`apps/docs/content/docs/postgres/iac/terraform.mdx` and
`apps/docs/content/docs/postgres/iac/pulumi.mdx`) so any reference to
`/postgres/introduction/management-api#service-tokens` is changed to
`/management-api/authentication#service-tokens`.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
apps/docs/content/docs/postgres/iac/alchemy.mdxapps/docs/content/docs/postgres/iac/meta.jsonapps/docs/content/docs/postgres/iac/pulumi.mdxapps/docs/content/docs/postgres/iac/terraform.mdxapps/docs/content/docs/postgres/meta.json
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
83fc1f1
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
apps/docs/content/docs/postgres/iac/alchemy.mdx (1)
189-190: Consider avoidinganytype in the example.Using
error: anyis a common TypeScript anti-pattern that documentation examples inadvertently teach. Consider usingunknownwith a type guard, or simply accessing the error message safely.💡 Cleaner error handling pattern
- } catch (error: any) { - return new Response(`Database error: ${error.message}`, { status: 500 }); + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + return new Response(`Database error: ${message}`, { status: 500 }); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/docs/content/docs/postgres/iac/alchemy.mdx` around lines 189 - 190, The catch block currently types the caught value as error: any; change this to error: unknown and handle it safely before using .message — for example, in the same catch block inside the function (the catch that returns new Response(...)), add a narrow/guard that checks if error is an object with a string message (or use String(error)) and then pass that safe message into new Response(`Database error: ${message}`, { status: 500 }); so only a properly-typed message is accessed instead of using any.apps/docs/content/docs/postgres/iac/pulumi.mdx (1)
54-56: Consider noting that the provider version should be updated periodically.Hardcoding
0.2.0is fine for documentation, but users should know to check for the latest version. The references section does link to the Terraform Registry where users can find the current version, which helps.💡 Optional enhancement
You could add a brief note that users should check the registry for the latest version:
```bash -pulumi package add terraform-provider registry.terraform.io/prisma/prisma-postgres 0.2.0 +pulumi package add terraform-provider registry.terraform.io/prisma/prisma-postgres 0.2.0 # Check registry for latest version</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@apps/docs/content/docs/postgres/iac/pulumi.mdxaround lines 54 - 56, Update
the pulumi package example that uses the command "pulumi package add
terraform-provider registry.terraform.io/prisma/prisma-postgres 0.2.0" to
include a brief note reminding users to check the Terraform Registry for the
latest provider version (or replace the hardcoded version with a placeholder
like ), e.g., add one-line guidance after the command indicating
the version should be updated periodically and where to find the current
version.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In@apps/docs/content/docs/postgres/iac/alchemy.mdx:
- Around line 189-190: The catch block currently types the caught value as
error: any; change this to error: unknown and handle it safely before using
.message — for example, in the same catch block inside the function (the catch
that returns new Response(...)), add a narrow/guard that checks if error is an
object with a string message (or use String(error)) and then pass that safe
message into new Response(Database error: ${message}, { status: 500 }); so
only a properly-typed message is accessed instead of using any.In
@apps/docs/content/docs/postgres/iac/pulumi.mdx:
- Around line 54-56: Update the pulumi package example that uses the command
"pulumi package add terraform-provider
registry.terraform.io/prisma/prisma-postgres 0.2.0" to include a brief note
reminding users to check the Terraform Registry for the latest provider version
(or replace the hardcoded version with a placeholder like ),
e.g., add one-line guidance after the command indicating the version should be
updated periodically and where to find the current version.</details> --- <details> <summary>ℹ️ Review info</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between d0973091dc06bbc0eb5a0c852c787525e3ce8e5b and 1bf5765790ac781106cad6612d33eaea095299de. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `apps/docs/content/docs/postgres/iac/alchemy.mdx` * `apps/docs/content/docs/postgres/iac/pulumi.mdx` * `apps/docs/content/docs/postgres/meta.json` </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * apps/docs/content/docs/postgres/meta.json </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Summary
Test plan
Summary by CodeRabbit