terraform-cdk icon indicating copy to clipboard operation
terraform-cdk copied to clipboard

Sentinel soft-mandatory failure missing from CDKTF CLI

Open schersh opened this issue 3 years ago • 0 comments

When performing a simple run with cdktf to a terraform cloud workspace that has sentinel policies applied, the CDKTF CLI does not communicate success/failure/error messages related to the policy checks, and has no support for overriding a failure from a soft-mandatory policy.

Example: Basically what happens is cdktf appears to have no knowledge of the sentinel policy checks and in some cases I can’t complete the runs, getting an error like:

Deploy: Request to Terraform Cloud failed with status 409: {"status":"409","title":"transition not allowed"}

If you refer to the TFC workspace, you will see a failure from a soft-mandatory policy, but there is no way to override this and continue with the apply from the CDKTF CLI.

Impact: When a Sentinel policy is set to evaluate to soft-mandatory, there would be no way to perform the apply with CDKTF if the policy fails (a soft-mandatory failure can be overridden and allowed to apply, but CDKTF CLI has no option for this).

schersh avatar Apr 29 '22 23:04 schersh