-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
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.yamlcontains aspecfield with JSON schema definitionvariables.tfcontains avariable "instance"block with aspecobject type- No validation exists to ensure these two are synchronized
Expected Behavior
When running validation commands (like ftf validate-directory), the tool should:
- Parse the
specschema fromfacets.yaml - Parse the
variable.instance.spectype definition fromvariables.tf - Validate that the Terraform type structure matches the JSON schema structure
- 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.