Skip to content

3.6.1

Release Date: May 21, 2026


๐Ÿ› Bug Fixes

Terraform Modules

โš ๏ธ Fix Event Service Secret Lookup via Required environment_short_name

PR: #708

Module: saif-event-service

โš ๏ธ Breaking Change โ€” The saif-event-service module now requires an environment_short_name variable. See Breaking Changes for migration steps.

Fixes a runtime secret lookup failure in the saif-event-service Terraform module. The local_secrets.tf file was using upper(var.environment) (e.g., PRODUCTION) to resolve environment-specific secrets from the ADO variable library. However, library keys use the short environment name (e.g., [PROD]primary_key), causing lookup failures for the production environment.

The fix introduces the required environment_short_name variable and updates secret resolution to use upper(var.environment_short_name), aligning the module with ADO library key naming conventions.

Changes:

  • โœ… Added required environment_short_name variable to saif-event-service module (e.g., "prod", "dev", "qa") โ€” no default value
  • โœ… local_secrets.tf now uses upper(var.environment_short_name) for environment key lookup (e.g., [PROD]primary_key)
  • โœ… Event service project template (event.generated.tf) passes the new variable through to the module call
  • โœ… Terraform tests updated with environment_short_name assertions, including a dedicated production_secret_lookup test case

Benefits:

  • ๐Ÿ”ง Fixes runtime secret lookup failure for production environments
  • ๐Ÿ”ง Aligns module behaviour with ADO library key naming convention ([PROD], not [PRODUCTION])
  • ๐Ÿงช New test explicitly asserts local.upper_environment == "PROD" to prevent regression

๐Ÿ”„ Breaking Changes

saif-event-service Module โ€” Required environment_short_name Variable

Impact: All existing callers of the saif-event-service module.

Change: The environment_short_name variable is now required with no default value. Terraform plan/apply will fail without it.

Migration:

Add environment_short_name to your saif-event-service module block:

Before:

module "event_service" {
  source  = "app.terraform.io/SAIFCorp/event-service/saif"
  version = "~> 3.6.0"

  environment = var.environment
  # ...
}

After:

module "event_service" {
  source  = "app.terraform.io/SAIFCorp/event-service/saif"
  version = "~> 3.6.1"

  environment            = var.environment           # e.g. "production"
  environment_short_name = var.environment_short_name # e.g. "prod"  โ† ADD THIS
  # ...
}

Required Actions:

  1. Add environment_short_name input to your saif-event-service module block
  2. Ensure var.environment_short_name is declared in your consuming module's variables.tf
  3. Pass the short environment name (e.g., "prod", "dev", "qa") matching your ADO library key prefix
  4. Bump the module version constraint to ~> 3.6.1

๐Ÿ“‹ Additional Notes

  • Total commits: 2
  • Files changed: 7
  • Contributors: Jason Coria Corona Yue

Support

  • ๐Ÿ“ง Teams Support Channel: Support