Run Terraform from Jenkins with a declarative pipeline. This generator writes a Jenkinsfile that initialises, validates, plans and applies per environment, gating each apply behind a manual approval.
Terraform Jenkins Pipeline Generator
Generate a declarative Jenkinsfile with plan/apply per environment.
Runs entirely in your browser - nothing is uploaded and no Jenkins server is contacted.
Your generated Jenkinsfile will appear here.
About Terraform Jenkins Pipeline Generator
Features
- Init + Validate - shared bootstrap stages.
- Plan / Apply per env - dev/staging/prod.
- Manual approval - input step before apply.
- Plan artifacts - applies the saved .tfplan.
- Version pin - environment TF_VERSION.
- Copy / Download / Print.
How to Use
- Set agent and Terraform version.
- Select environments.
- Generate and commit the Jenkinsfile.
Examples
Example - dev + prod produces Plan dev, Apply dev (with approval), Plan prod, Apply prod.
Benefits
- Controlled rollout - approvals before apply.
- Reproducible - pinned plan files.
- Standard - declarative syntax.
- Private - browser only.
Frequently Asked Questions
What does this generate?
A declarative Jenkinsfile that runs terraform init, validate, plan and apply. Plan and apply run per selected environment, with an input step gating each apply.
How are approvals handled?
Each apply stage includes a Jenkins input step (manual approval) before running terraform apply.
Does the plan carry to apply?
Yes, it saves a .tfplan artifact per environment and applies that exact plan file.
Does this connect to Jenkins?
No. It only builds the Jenkinsfile text in your browser.
Can I download it?
Yes. Copy, download or print the Jenkinsfile.