Cursor repairs a Postgres Terraform apply
Weston Platter tested Cursor Agent mode with a Terraform MCP server to provision a local Postgres database, schema and application role. The deployment eventually worked, but the MCP interface initially hid the errors needed to diagnose it.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
Run the local Terraform plan and inspect its result. If MCP hides an error, use the terminal to capture it and propose the smallest reviewed configuration fix.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source author
- Weston Platter
- Original account
- Read the source ↗
- Published
- 17 Apr 2025
- Source link checked
- 15 Oct 2026
- Reported result
- Weston Platter tested Cursor Agent mode with a Terraform MCP server to provision a local Postgres database, schema and application role. The deployment eventually worked, but the MCP interface initially hid the errors needed to diagnose it.
- Human involvement
- Platter wrote Terraform configuration, inspected hidden errors directly and granted database privileges manually before the agent proposed its provider fix.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Write local Postgres resources and configure tfmcp in Cursor.
- Attempt Terraform apply and inspect errors directly when MCP fails to surface them.
- Grant missing privileges manually, use Cursor Run to diagnose the provider issue and apply the corrected configuration.
Weston Platter tested Cursor Agent mode with a Terraform MCP server to provision a local Postgres database, schema and application role. The deployment eventually worked, but the MCP interface initially hid the errors needed to diagnose it.
Platter wrote the Terraform configuration and connected tfmcp to the correct directory and executable path. When the agent ran apply, it did not clearly report whether the operation had succeeded. Running the command directly exposed a permissions error: the administrative user lacked the privileges to create roles and databases. Platter granted those privileges himself through psql.
A second apply still failed through MCP without a useful error. Cursor suggested switching to its terminal Run capability. With the actual output visible, it identified a working provider configuration change, setting superuser to false. The author then applied the changes successfully and returned to tfmcp for later operations.
The author says this setup did not make the task easier than familiar command-line tools. Its useful contribution was interpreting an exposed error and proposing a repair. This was a local infrastructure experiment with deliberately insecure demonstration credentials, not a recommended production configuration. Human database expertise and permission changes remained necessary.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: masterpoint.io · Weston Platter
Frequently asked questions
What did the agent do?
It ran Terraform through MCP and Cursor Run, interpreted exposed terminal errors and proposed a provider configuration repair.
What remained the human’s responsibility?
Platter wrote Terraform configuration, inspected hidden errors directly and granted database privileges manually before the agent proposed its provider fix.
Who repaired the database privileges?
Platter inspected the errors and granted the required privileges manually through psql before the later provider-configuration repair.
More details
About this account
Cursor attempted Terraform commands through MCP, then interpreted terminal errors and proposed the provider setting that enabled apply.
Firsthand account opened and read. Outcome is source-reported, not independently reproduced. Suggested prompt written by Agents In Use. Human privileges repair was necessary; local demo credentials and configuration are not production guidance.
Credit: Weston Platter
Source published 17 Apr 2025
Source checked 15 Oct 2026
Tools and topics
Terraform · tfmcp · PostgreSQL · psql
Terraform · tfmcp · PostgreSQL
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.