terraform_parser/
lib.rs

1pub mod block_expressions_representation;
2pub mod change_representation;
3pub mod configuration_representation;
4pub mod expression_representation;
5pub mod plan_representation;
6pub mod state_representation;
7pub mod values_representation;
8
9use plan_representation::PlanRepresentation;
10use state_representation::StateRepresentation;
11
12pub struct TerraformParser {}
13
14impl TerraformParser {
15    pub fn parse_state(input: &str) -> Result<StateRepresentation, serde_json::Error> {
16        serde_json::from_str(&input)
17    }
18
19    pub fn parse_plan(input: &str) -> Result<PlanRepresentation, serde_json::Error> {
20        serde_json::from_str(&input)
21    }
22}