cisagov / cisagov/skeleton-tf-module

Unresolvable "Empty provider configuration blocks are not required" warnings from "terraform validate"

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
5
Forks
4
Avg merge
17m
Merged PRs (30d)
1

Description

# 🐛 Summary #

While not present in this skeleton Terraform module, some descendant modules get `terraform validate` warnings about "Empty provider configuration blocks are not required". This started happening after we moved from Terraform 0.14.x to Terraform 1.0.x.

See https://github.com/hashicorp/terraform/issues/28490 for more information about why this is happening and why we cannot do anything to fix it right now.

## Any helpful log output or screenshots ##

This is an example of the `terraform validate` warning that comes up for `cisagov/cool-assessment-terraform`:

```console
│ Warning: Empty provider configuration blocks are not required

│ on .terraform/modules/read_terraform_state/providers.tf line 2:
│ 2: provider "aws" {

│ Remove the aws.users provider block from module.read_terraform_state. Add aws.users to the list of configuration_aliases for aws in required_providers to define the provider
│ configuration name.
```

Contributor guide

Open the contributing guide

Research direction

Start by running terraform validate in a descendant module that produces the warning and compare its provider configuration with the example in .terraform/modules/read_terraform_state/providers.tf. Read Terraform issue #28490 for the stated limitation; this issue does not identify a repository change or a clear completion condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.