Run Terraform changes from one shared place

Connect your Terraform code to Semaphore. Select a workspace, review plan output, run Apply and keep the execution history available to your team.

The change is reviewed. Is the run repeatable?

The code is in Git, but the workspace, variables and credentials can differ between terminal sessions. The next engineer needs the same starting point.

Give each infrastructure operation a saved setup

  • Save the configuration directory and workspace
  • Supply variables through reusable Variable Groups
  • Review Plan and Apply as separate recorded tasks

Bring Terraform operations into your team’s process

Provision an application environment

Create a template for your configuration directory and workspace. Supply environment inputs through Variable Groups.

Share a prepared job

Review a proposed infrastructure change

Start a Plan-only task and share its output. Run Apply as a separate action when the team is ready to make the change.

Share a prepared job

Recheck infrastructure for drift

Schedule a Plan-only template to compare configuration with infrastructure and retain each plan’s output. Review the plan for differences.

Set up a schedule

Configure Terraform and start a Plan-only run

Continue from provisioning to a configured service

A successful Terraform step publishes infrastructure outputs automatically. Map those values into an Ansible task’s inputs, then verify the configured service with Python. Workflows connect the jobs, their data and their success or failure paths.

Application environment rolloutWorkflow
Provision infrastructure
On successOutputs → inputs
Configure services
On successOutputs → inputs
Verify the deployment
On failure
Collect diagnostics

Workspaces, inputs and state for Terraform jobs

Separate planning from applying

Choose Plan to inspect proposed changes without applying them. Apply is a separate execution. A later Apply does not automatically use the saved output of an earlier Plan task.

Choose the workspace and inputs

Select a Terraform workspace through the template’s Inventory field. Use Variable Groups with TF_VAR_ names for inputs. Workspace selection does not automatically select different variables or credentials.

Keep your backend or use Semaphore’s

Continue with the backend in your Terraform code. Pro can override it with Semaphore’s HTTP backend, which provides locking, state versions and UI management.

Prepare a consistent Terraform runtime

Semaphore runs init before execution. Prepare the Terraform version, providers, private-module credentials and API access on the server or runner that executes the job.

FAQ

Can I run my existing Terraform configurations in Semaphore?

Yes. Create a Terraform Task Template pointing at the repository and configuration directory. Select its workspace, supply inputs through Variable Groups and prepare the required Terraform runtime. Semaphore runs your configuration and keeps the task output and execution status.

Do I have to move Terraform state into Semaphore?

No. Terraform can continue using the backend configured in your code. In Pro, you can select Semaphore’s HTTP backend for state locking, version history and UI management. Choose the backend that fits your existing access and recovery process.

Does selecting a Terraform workspace also change variables and credentials?

No. Workspace selection chooses the state workspace. Configure the variables and credentials the job needs separately. Use deliberate combinations of Task Templates and Variable Groups for environments with different inputs, and make the intended scope clear in the template name.

Does Apply use the plan from an earlier task?

A later Apply does not automatically consume the saved output of an earlier Plan task. They are separate executions. Use Plan to review proposed changes, then choose the intended Apply operation. Task history keeps the output and result of each run.

Can a scheduled Terraform plan help us review drift?

Yes. Schedule a Plan-only template and inspect its output for differences between configuration and infrastructure. Each run has a record. This provides a recurring plan to review rather than an automatic alert for every drift detected in the plan.

Can Terraform provisioning be followed by Ansible configuration?

Yes. Put the Terraform Task Template before an Ansible template in a Workflow, then add checks such as a Python readiness job. Configure the conditions that start each step. The Terraform plan and state remain separate from Workflow coordination.

How can I supply Terraform variables and credentials?

Attach Variable Groups to the template. Use TF_VAR_ names for Terraform input variables, and the environment values expected by your providers for authentication. Keep sensitive values in secret entries and prepare module and backend access on the execution environment.

Is this the same as the Semaphore Terraform provider?

No. This integration executes your infrastructure Terraform configurations as Semaphore tasks. The Semaphore Terraform provider works in the other direction, using Terraform to manage supported Semaphore resources. You can use either approach independently or combine them in your setup.