terraform-plan-parser
terraform-plan-parser copied to clipboard
Parsing map and array attributes
Parse complex attributes as maps and arrays instead of separate attribute per item.
Given resource:
resource "null_resource" "cluster" {
triggers {
cluster_instance_ids = "id"
}
Current output:
"changedAttributes": {
"id": {
"new": {
"type": "computed"
}
},
"triggers.%": {
"new": {
"type": "string",
"value": "1"
}
},
"triggers.cluster_instance_ids": {
"new": {
"type": "string",
"value": "id"
}
}
}
Expected output:
"changedAttributes": {
"id": {
"new": {
"type": "computed"
}
},
"triggers": {
"new": {
"type": "map",
"value": {
"cluster_instance_ids": "id",
}
}
}
}