Skip to content

docs: add remote execution page for Terraform/OpenTofu - #20570

Open
nyobe wants to merge 1 commit into
masterfrom
push-xntnnnyqwpnt
Open

docs: add remote execution page for Terraform/OpenTofu#20570
nyobe wants to merge 1 commit into
masterfrom
push-xntnnnyqwpnt

Conversation

@nyobe

@nyobe nyobe commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new documentation page at /docs/iac/get-started/terraform/terraform-remote-execution/ covering Pulumi Cloud's remote execution support for Terraform and OpenTofu workloads
  • Updates the existing Terraform state backend page with remote execution callouts and corrected FAQ entries (drift detection, preventative policies)

New page covers

  • Setup with cloud {} block (and note that backend "remote" also works)
  • CLI workflows: plan, apply, saved plans/bookmarks, destroy/refresh/target
  • Run serialization (FIFO queue per workspace)
  • ESC integration with auto-provisioned environments and TF_VAR_* convention
  • VCS-triggered runs via deployment settings, with manual approval (confirm/discard)
  • Preventative policy enforcement
  • CI/CD example (GitHub Actions)
  • Execution mode control via terraform:execution-mode stack tag
  • HCP Terraform migration guide
  • FAQ

Test plan

  • make lint passes
  • make build passes
  • Visual review of rendered page on preview deploy

🤖 Generated with Claude Code

Co-Authored-By: Claire Gaestel claire@pulumi.com

@pulumi-bot

pulumi-bot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

@nyobe
nyobe force-pushed the push-xntnnnyqwpnt branch from 6ea6d23 to b39da96 Compare July 29, 2026 22:26
@nyobe
nyobe force-pushed the push-xntnnnyqwpnt branch from b39da96 to fdb413b Compare July 29, 2026 22:50
@nyobe
nyobe force-pushed the push-xntnnnyqwpnt branch from fdb413b to b0ecc6e Compare July 29, 2026 23:03
@nyobe
nyobe force-pushed the push-xntnnnyqwpnt branch from b0ecc6e to 5ca50f6 Compare July 30, 2026 04:54
@nyobe
nyobe marked this pull request as ready for review July 30, 2026 15:36
@github-actions github-actions Bot added review:triaging Claude Triage is currently classifying the PR domain:docs PR touches technical docs review:in-progress Claude review is currently running review:error Workflow failed before publishing a review; see Actions logs and removed review:triaging Claude Triage is currently classifying the PR review:in-progress Claude review is currently running labels Jul 30, 2026
Add a new documentation page covering Pulumi Cloud's remote execution
support for Terraform and OpenTofu workloads. Covers setup with the
cloud {} block, CLI workflows (plan, apply, saved plans, destroy/refresh),
ESC integration with auto-provisioned environments, VCS-triggered runs
via deployment settings, preventative policy enforcement, and HCP
Terraform migration.

Also updates the existing Terraform state backend page:
- Adds remote execution callout in the "How it works" section
- Updates drift detection FAQ (remote exec available, drift not yet)
- Updates preventative policies FAQ and notes (now available with remote exec)

Co-Authored-By: Claude <noreply@anthropic.com>

@cnunciato cnunciato left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great! A few questions and suggestions from me, but otherwise seems good to go. Leaving you an approval to keep you unblocked.

### Can I use drift detection with Terraform-managed stacks?

Not currently. Drift detection and [Pulumi Deployments](/docs/pulumi-cloud/deployments/) require a Pulumi program to execute. If you want these features, you can [convert your Terraform code to Pulumi](/docs/iac/get-started/terraform/convert-hcl/) and then run updates with the Pulumi CLI.
Not currently. Drift detection requires a Pulumi program. If you want this feature, you can [convert your Terraform code to Pulumi](/docs/iac/get-started/terraform/convert-hcl/) and run updates with the Pulumi CLI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would work for Pulumi HCL though, right? (If so, maybe a mention of that also.)


Remote execution gives you:

- **Consistent environment** — every plan and apply runs in the same managed infrastructure, not on individual developer machines

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we mention approvals in this list?

aliases:
---

Pulumi Cloud can run your Terraform and OpenTofu operations remotely. Instead of running `plan` and `apply` on your local machine, the Terraform or OpenTofu CLI uploads your configuration to Pulumi Cloud, which executes the operation in a managed container and streams the output back to your terminal in real time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be worth mentioning something about how this is designed to work like HCP Terraform and TFE?


## How it works

When you run `terraform plan` or `terraform apply` against a Pulumi Cloud workspace with remote execution enabled:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
When you run `terraform plan` or `terraform apply` against a Pulumi Cloud workspace with remote execution enabled:
When you run `terraform plan` or `terraform apply` against a Pulumi Cloud workspace with [remote execution enabled](#enable-remote-execution):


## How it works

When you run `terraform plan` or `terraform apply` against a Pulumi Cloud workspace with remote execution enabled:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we calling these "workspaces", or "stacks"? They're technically stacks, right? (If so, maybe mention that the concepts are similar and that we call them stacks in Pulumi, then replace the "workspace" mentions throughout.)


{{< /chooser >}}

The saved plan file is a bookmark — the actual plan artifact is stored securely in Pulumi Cloud. When you apply the bookmark, Pulumi Cloud uses the original saved plan, guaranteeing that the apply matches exactly what you reviewed even if infrastructure drifted in the meantime.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it worth conveying how it's (presumably) scoped to this particular stack? Do successive plans run against this stack overwrite each other? 🤔


1. Follow the [HCP Terraform state migration steps](/docs/iac/get-started/terraform/terraform-state-backend/#migrate-from-hcp-terraform-terraform-cloud) to move your state.
1. Update your `cloud` block to point at Pulumi Cloud (change `hostname` and `organization`).
1. Add your cloud credentials to the stack's [automatically provisioned ESC environment](#provide-credentials-with-esc) to replace workspace variables.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it make sense to mention anything about Vault integration here?


### Is drift detection available?

Not currently for Terraform-managed stacks. You can run `terraform plan` on a schedule via CI/CD to detect drift manually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we mention that you can do this (assuming you actually can) through our HCL language support?

djperlovsky added a commit that referenced this pull request Jul 31, 2026
Per the companion docs PR (#20570), new stacks created through the
Terraform or OpenTofu CLI default to remote execution; existing stacks
enable it with a stack tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain:docs PR touches technical docs review:error Workflow failed before publishing a review; see Actions logs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants