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
deployment
block defines how many times you want to deploy your Stack's infrastructure and with what input values. - The
deployment_group
block groups deployments together to configure shared settings and auto-approval rules. - The
deployment_auto_approve
block defines rules that automatically approve deployment plans based on specific conditions. - The
identity_token
block defines JSON Web Tokens (JWT) that Terraform generates for OIDC authentication with cloud providers. - The
store
block provides access to external secret stores and variable sets from your deployment configuration. - The
publish_output
block exports values from your Stack that other Stacks in the same project can consume. - The
upstream_input
block consumes outputs from another Stack in the same project and uses them as inputs in your current Stack. - The
locals
block defines local values that you can reference within your deployment configuration.