Skip to content

Report mismatching dependent keys as diagnostics #1484

Open
@radeksimko

Description

@radeksimko

Context

Currently whenever there are "dependent body mismatches", such as in the examples below, we silently suppress the validation:

Core Schema

resource "aws_instance" "name" {
  provisioner "non-existent" {
    
  }
}
data "terraform_remote_state" "name" {
  backend = "nonsense"
}
terraform {
  backend "nonsense" {
    
  }
}

Provider Schema

provider "non-sense" {
  
}
resource "non-sense" "foo" {
  
}

In the case of provider schemas, there is additional complexity to be aware of. We may not have a reliable way of knowing whether or not is a resource type is valid or not. Providers are a little easier but we'd still have to rely heavily on what is declared in required_providers. Implied hashicorp/ providers may be a bit trickier.

Proposal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions