Skip to content

Conversation

Roberdvs
Copy link

Description

Remove redundant empty provider blocks that are not necessary since the required_providers block already defines the configuration_aliases.

Motivation and Context

Suppresses the following warning during plans:

Warning: Redundant empty provider block

  on .terraform/modules/zone_cross_account_vpc_association/modules/zone-cross-account-vpc-association/versions.tf line 13:
  13: provider "aws" {

Earlier versions of Terraform used empty provider blocks ("proxy provider
configurations") for child modules to declare their need to be passed a
provider configuration by their callers. That approach was ambiguous and is
now deprecated.

If you control this module, you can migrate to the new declaration syntax by
removing all of the empty provider "aws" blocks and then adding or updating
an entry like the following to the required_providers block of
module.zone_cross_account_vpc_association:
    aws = {
      source = "hashicorp/aws"
      configuration_aliases = [
        aws.r53_owner,
        aws.vpc_owner,
      ]
    }

@Roberdvs Roberdvs changed the title fix: remove redundant empty provider blocks Fix: remove redundant empty provider blocks Jul 28, 2025
@Roberdvs Roberdvs changed the title Fix: remove redundant empty provider blocks fix: Remove redundant empty provider blocks Jul 28, 2025
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Aug 29, 2025
Copy link

github-actions bot commented Sep 8, 2025

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this Sep 8, 2025
@antonbabenko
Copy link
Member

This issue has been resolved in version 6.0.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants