Description of changes: The state file from the apply stage was not passed on to the destroy stage. Hence same has been rectified by archiving the stage output of Apply stage and passing it as input to the Destroy stage.
Issue #3: tfsec console output shows success even when there are failures
Description of changes: The validation shell script was using the command $? to retrieve the last execution output from the tfsec command execution. However, there was a ls command just before above statement, which always returned the status as success. Hence removed this unwanted ls command and the issue got resolved.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #4: Terraform destroy stage failing
Description of changes: The state file from the apply stage was not passed on to the destroy stage. Hence same has been rectified by archiving the stage output of Apply stage and passing it as input to the Destroy stage.
Issue #3: tfsec console output shows success even when there are failures
Description of changes: The validation shell script was using the command
$?
to retrieve the last execution output from the tfsec command execution. However, there was als
command just before above statement, which always returned the status as success. Hence removed this unwantedls
command and the issue got resolved.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.