Skip to content

Validate variable.instance.spec in variables.tf matches facets.yaml spec structure #52

@anujhydrabadi

Description

@anujhydrabadi

Problem

The validation process needs to ensure that the variable.instance.spec structure in variables.tf matches the spec structure defined in facets.yaml.

Currently, there's no validation to verify that when a module's facets.yaml defines a spec schema, the corresponding variables.tf file's variable.instance.spec object type definition matches that structure.

Current State

  • facets.yaml contains a spec field with JSON schema definition
  • variables.tf contains a variable "instance" block with a spec object type
  • No validation exists to ensure these two are synchronized

Expected Behavior

When running validation commands (like ftf validate-directory), the tool should:

  1. Parse the spec schema from facets.yaml
  2. Parse the variable.instance.spec type definition from variables.tf
  3. Validate that the Terraform type structure matches the JSON schema structure
  4. Report any mismatches with clear error messages

Impact

This validation will help catch configuration drift and ensure module consistency between the YAML specification and Terraform implementation.

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