Zum Inhalt springen

Plugin: updater-terraform

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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.

Terminal window
go install github.com/SemRels/updater-terraform@latest

Each 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.

version: 1
plugins:
- name: updater-terraform
path: updater-terraform
args:
file: variables.tf
variable: app_version
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEnovariables.tfTerraform file to update.
SEMREL_PLUGIN_VARIABLEnoapp_versionTerraform variable name that stores the release version.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can change default = "1.3.2" to default = "1.4.0" for the configured Terraform variable.