Skip to content

feat: Add region variable to alias submodule for provider v6 resource-level region#761

Open
somaz94 wants to merge 1 commit into
terraform-aws-modules:masterfrom
somaz94:feat/alias-region-passthrough
Open

feat: Add region variable to alias submodule for provider v6 resource-level region#761
somaz94 wants to merge 1 commit into
terraform-aws-modules:masterfrom
somaz94:feat/alias-region-passthrough

Conversation

@somaz94

@somaz94 somaz94 commented Jul 1, 2026

Copy link
Copy Markdown

The modules/alias submodule had no region variable, so callers relying on the root module's provider-v6 resource-level region support could not guarantee the alias and its associated resources land in the same region as the function. They silently fell back to the provider's configured region, causing a ResourceNotFoundException at apply time when the function lived in a different region.

This adds an optional region variable (default null) to modules/alias and passes it to all seven regional resources, mirroring the root module's existing pattern:

  • data.aws_lambda_alias.existing
  • aws_lambda_alias.no_refresh / aws_lambda_alias.with_refresh
  • aws_lambda_function_event_invoke_config.this
  • aws_lambda_permission.version_triggers / aws_lambda_permission.qualified_alias_triggers
  • aws_lambda_event_source_mapping.this

The wrappers/alias passthrough and the terraform-docs README row are included. Backward compatible: default = null is a no-op for existing users, and the provider requirement is already >= 6.28 so no version bump is needed.

Validation (local, all green):

  • terraform fmt -check -recursive: clean
  • terraform validate (init -backend=false): Success
  • tflint: exit 0
  • terraform-docs (v0.20.0): README Inputs table in sync, region row added

closes #760

@somaz94 somaz94 marked this pull request as ready for review July 2, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modules/alias: missing region attribute for AWS provider v6 resource-level region support

1 participant