Terraform
Deployment configuration overview
Deployment configuration files define how HCP Terraform deploys your Stack's infrastructure. You write deployment configuration in .tfdeploy.hcl files.
Note: HCP Terraform supports up to a maximum of 20 deployments per Stack.
Background
In deployment configuration files, you specify how many times to deploy your Stack's infrastructure and with what input values. Each deployment runs in its own isolated agent, ensuring that changes in one deployment do not affect others. Your Stack must have at least one deployment block.
To learn more, refer to Define deployment configuration.
Configuration blocks
You can define the following blocks in deployment configuration files:
- The deploymentblock defines how many times you want to deploy your Stack's infrastructure and with what input values.
- The deployment_groupblock groups deployments together to configure shared settings and auto-approval rules.
- The deployment_auto_approveblock defines rules that automatically approve deployment plans based on specific conditions.
- The identity_tokenblock defines JSON Web Tokens (JWT) that Terraform generates for OIDC authentication with cloud providers.
- The storeblock provides access to external secret stores and variable sets from your deployment configuration.
- The publish_outputblock exports values from your Stack that other Stacks in the same project can consume.
- The upstream_inputblock consumes outputs from another Stack in the same project and uses them as inputs in your current Stack.
- The localsblock defines local values that you can reference within your deployment configuration.