Skip to content

feat(cli): terraform & opentofu hcl ast analysis, state introspection & drift optimization research #310

Closed

Description

@dan-petty

Context & Rationale

Infrastructure as Code commands execute full tofu / terraform binary runs for static checks, incurring substantial startup latency and disk I/O for simple plan and drift inspections.

Scope & Deliverables

  • Context & Rationale*: Infrastructure as Code commands execute full tofu / terraform binary runs for static checks, incurring substantial startup latency and disk I/O for simple plan and drift inspections.
  • Deep Integration & Functional Extension*: In-process HCL AST parsing (python-hcl2) and state file JSON schema introspection (terraform.tfstate) to inspect resource graphs, analyze attribute references, detect configuration drift, and calculate cost estimations without spawning binary CLI processes for read-only queries.
  • Code Optimization & Performance Acceleration*: Accelerate IaC drift detection and configuration linting by 90%+ by bypassing CLI binary initialization; construct direct topological resource DAGs in memory for instant blast-radius visualization.
  • Refactoring Potential & Legacy Elimination*: Refactor src/devops_cli/commands/tf.py into a declarative IaC analysis service; remove repetitive CLI argument list builders; replace ad-hoc regex cost estimation with a typed Infracost schema parser.

Strategic Alignment

  • Milestone: v0.2.22 (Deep Subsystem Integration, Architectural Optimization & Extensible Refactoring)
  • Roadmap Reference: docs/ROADMAP.md

Activity

  1. added this to the v0.2.22 milestone on Sep 19, 2026
  2. added
    type/feature
    scope/cli
    priority/p1-high
    on Sep 19, 2026
  3. dan-petty commented on Sep 21, 2026

    @dan-petty
    OwnerAuthor

    Closed by #352, merged into release/v0.2.22.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  4. added a commit that references this issue on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/clitype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions