Skip to main content

Module validate

Expand description

OpenTofu infrastructure validation step

This module provides the ValidateInfrastructureStep which handles OpenTofu validation by executing tofu validate. This step validates the syntax and internal consistency of configuration files without creating a plan or applying changes.

§Key Features

  • Configuration syntax validation and error detection
  • Internal consistency checks for resource definitions
  • Provider schema validation against installed providers
  • Integration with OpenTofuClient for command execution

§Validation Process

The step executes tofu validate which:

  • Validates syntax of all .tf configuration files
  • Checks for missing required arguments and invalid attribute names
  • Validates resource and data source configurations against provider schemas
  • Ensures internal consistency of variable references and expressions

This step should be run after initialization but before planning to catch configuration errors early in the workflow.

Structs§

ValidateInfrastructureStep
Simple step that validates OpenTofu configuration by executing tofu validate