Skip to content

Commit

Permalink
🐛 terraform: avoid nil crash on non-existent block in module
Browse files Browse the repository at this point in the history
Fixes #3377

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus committed Feb 27, 2024
1 parent a6243ff commit 91b11ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions providers/terraform/resources/hcl.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,11 @@ func (t *mqlTerraformModule) block() (*mqlTerraformBlock, error) {
}
}

if mqlHclBlock == nil {
t.Block.State = plugin.StateIsNull | plugin.StateIsSet
return nil, nil
}

return mqlHclBlock, nil
}

Expand Down

0 comments on commit 91b11ca

Please sign in to comment.