Skip to main content

extract_terraform

Function extract_terraform 

Source
pub fn extract_terraform(
    source_path: &str,
    input: &str,
) -> Result<InfrastructureDocument, InfrastructureExtractionError>
Expand description

Extracts explicit Terraform or OpenTofu resource declarations from HCL.

Only literal names, images, ports, dependency traversals, and environment key names are retained. Dynamic expressions are omitted.

ยงErrors

Returns InfrastructureExtractionError when the source path, size, HCL syntax, structural depth, or syntax item count exceeds a documented bound.