Relative Content

Tag Archive for terraformhcl

terraform assertion raises only warning

I am using terraform check block to check whether the environment provided by user matches the selected workspace. When I do apply or plan, I do see that assertion check has failed (for mismatched values) but it doesn’t throw an error. Is there a way to raise an error when the assertion check fails. My idea is to halt plan or apply operation if the provided environment doesn’t match the selected workspace before proceeding to apply/check for other resources.