feat: Add region variable to alias submodule for provider v6 resource-level region#761
Open
somaz94 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
modules/aliassubmodule had noregionvariable, so callers relying on the root module's provider-v6 resource-levelregionsupport 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 aResourceNotFoundExceptionat apply time when the function lived in a different region.This adds an optional
regionvariable (defaultnull) tomodules/aliasand passes it to all seven regional resources, mirroring the root module's existing pattern:data.aws_lambda_alias.existingaws_lambda_alias.no_refresh/aws_lambda_alias.with_refreshaws_lambda_function_event_invoke_config.thisaws_lambda_permission.version_triggers/aws_lambda_permission.qualified_alias_triggersaws_lambda_event_source_mapping.thisThe
wrappers/aliaspassthrough and the terraform-docs README row are included. Backward compatible:default = nullis a no-op for existing users, and the provider requirement is already>= 6.28so no version bump is needed.Validation (local, all green):
terraform fmt -check -recursive: cleanterraform validate(init -backend=false): Successtflint: exit 0terraform-docs(v0.20.0): README Inputs table in sync, region row addedcloses #760