Loading...
Loading...
### Terraform Version ```shell Terraform v1.10.2 on darwin_arm64 ``` ### Terraform Configuration Files I had this configuration ``` provider "aws" { alias = "ses" region = var.aws_ses_region } provider "aws" { alias = "aws_no_defaults" } ``` But I got this warning: ``` │ Warning: Redundant empty provider block │ │ on modules/private-cloud/main.tf line 6: │ 6: 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.private-cloud: │ aws = { │ source = "hashicorp/aws" │ configuration_aliases = [ │ aws.aws_no_defaults, │ ] │ } ``` Once I removed `provider` blocks and added this one: ``` terraform { required_providers { # 3rd party provider should be defined inside module acme = { source = "vancluever/acme" version = "~> 2.26" } aws = { source = "hashicorp/aws" configuration_aliases = [ aws.cdn_provider, aws.aws_no_defaults, ] } } } ``` I got another error: ``` │ Error: Provider configuration not present │ │ To work with module.private-cloud.aws_sns_topic.ses-private-portal-bounces its original │ provider configuration at │ module.private-cloud.provider["registry.terraform.io/hashicorp/aws"].ses is required, │ but it has been removed. This occurs when a provider configuration is removed while │ objects created by that provider still exist in the state. Re-add the provider │ configuration to destroy module.private-cloud.aws_sns_topic.ses-private-portal-bounces, │ after which you can remove the provider configuration again. ``` ### Debug Output See above ### Expected Behavior Terraform requires clear way to pass providers ### Actual Behavior It is hard to configure providers. In my case I just want to disable tags by defaults for one of resources. Unfortunately `tags_all = {}` does not work. Alternate solution `tags_all = { Project = null }` It should be detected that Project is defined but have null value. ### Steps to Reproduce 1. Configure two providers with and without tags by default 2. Pass providers to module ### Additional Context _No response_ ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.