Skip to content

Conversation

moko-poi
Copy link
Contributor

@moko-poi moko-poi commented Oct 6, 2025

Description

Updates the Karpenter example to use AWS Provider v6.0.0+ region attribute instead of aliased provider configurations. This change modernizes the configuration by:

  • Removing the aliased aws.virginia provider block
  • Updating aws_ecrpublic_authorization_token data source to use the region attribute directly
  • Maintaining single AWS provider configuration while supporting multi-region resources

The functionality remains identical, but the configuration now follows the modern AWS Provider v6 pattern for multi-region resource management.

Motivation and Context

AWS Provider v6.0.0 introduced the ability to specify the region attribute directly on individual resources and data sources, eliminating the need for multiple aliased provider configurations in many use cases.

The current Karpenter example uses the pre-v6 pattern with aliased providers, which may confuse users migrating to v6 and doesn't demonstrate the simplified approach available in newer provider versions.

Fixes #3537

Breaking Changes

No breaking changes. This is a configuration modernization that maintains the same functionality:

  • ECR Public authentication still uses us-east-1 region
  • All other resources continue to use the default region (eu-west-1)
  • The generated infrastructure and behavior remain identical

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
    • Validated Terraform configuration syntax with terraform validate
    • Confirmed successful module initialization with terraform init
    • Verified no changes to resource configuration or functionality
  • I have executed pre-commit run -a on my pull request

@moko-poi moko-poi changed the title feat(karpenter): support AWS Provider v6 region attribute feat(karpenter): Support AWS Provider v6 region attribute Oct 6, 2025
@bryantbiggs bryantbiggs changed the title feat(karpenter): Support AWS Provider v6 region attribute docs: Update Karpenter example to use region argument in place of aliased AWS provider Oct 6, 2025
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@bryantbiggs bryantbiggs merged commit bf8c86f into terraform-aws-modules:master Oct 6, 2025
20 checks passed
@antonbabenko
Copy link
Member

This PR is included in version 21.3.2 🎉

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.

Support for AWS Provider v6 region attribute in example karpenter
3 participants