Skip to content

Plan and apply

The plan and apply operations are the core of Terrateam’s functionality. They allow you to preview and execute changes to your infrastructure in a controlled and collaborative manner.


The plan operation is a read-only operation that generates a plan of the changes that Terraform will make to your infrastructure. When a pull request is opened or updated with changes to Terraform code, Terrateam automatically triggers a plan operation.

  1. Open a pull request with changes to your Terraform code.

  2. Terrateam automatically runs a plan operation and comments on the pull request with the plan output.

  3. Review the plan output and collaborate with your team to ensure the changes are as expected.

You can also manually trigger a plan operation by commenting terrateam plan on the pull request.


The apply operation executes the plan generated by the plan operation. It makes the actual changes to your infrastructure.

To trigger an apply operation:

  1. Ensure that the pull request has a successful plan operation.

  2. Comment terrateam apply on the pull request.

  3. Terrateam acquires a lock, runs the apply operation, and comments on the pull request with the apply output.

  4. Merge the pull request to complete the changes.

  5. Terrateam releases the lock.

Apply requirements

Terrateam has a set of apply requirements that must be met before an apply operation can be triggered. These include:

You can configure these requirements in your Terrateam configuration file.


Terrateam can be configured to automatically apply changes when a pull request is merged. This is called autoapply and can be enabled in your Terrateam configuration file.

We use cookies and similar technologies to provide certain features, enhance the user experience and deliver content that is relevant to your interests. Depending on their purpose, analysis and marketing cookies may be used in addition to technically necessary cookies. By clicking on "Agree and continue", you declare your consent to the use of the aforementioned cookies. Here you can make detailed settings or revoke your consent (in part if necessary) with effect for the future. For further information, please refer to our Privacy Policy .