Plugin: updater-terraform
Updates a Terraform variable that stores the application version. It is useful when Terraform modules or deployments need the new release version written into configuration.
Installation
Section titled “Installation”go install github.com/SemRels/updater-terraform@latestEach plugin is a standalone Go binary. Keep it on your PATH or reference it with path: in .semrel.yaml. If you keep secrets in a .env file, load them with semrel --env-file .env release.
Configuration
Section titled “Configuration”version: 1plugins: - name: updater-terraform path: updater-terraform args: file: variables.tf variable: app_versionEnvironment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_FILE | no | variables.tf | Terraform file to update. |
SEMREL_PLUGIN_VARIABLE | no | app_version | Terraform variable name that stores the release version. |
Release Context Variables
Section titled “Release Context Variables”SEMREL_NEXT_VERSIONSEMREL_CURRENT_VERSIONSEMREL_TAG_NAMESEMREL_DRY_RUN
Behavior
Section titled “Behavior”For a 1.4.0 release, the updater can change default = "1.3.2" to default = "1.4.0" for the configured Terraform variable.