Terraform Version
Terraform command entered
terraform plan -destroy -detailed-exitcode
Expected Behavior
This is a new project and no infrastructure has been created as yet.
In the presence of the -detailed-exitcode option, I would expect the return code to be 0 (i.e. Succeeded with empty diff - no changes)
Actual Behavior
The command completes with a return code of 2 (i.e. Succeeded with non-empty diff - changes present)
In this case, the return code is misleading since there is no infrastructure to destroy since nothing has been created as yet.
Steps to Reproduce
Run the following command
terraform plan -destroy -detailed-exitcode
Additional Context
References
Terraform Version
Terraform command entered
Expected Behavior
This is a new project and no infrastructure has been created as yet.
In the presence of the -detailed-exitcode option, I would expect the return code to be 0 (i.e. Succeeded with empty diff - no changes)
Actual Behavior
The command completes with a return code of 2 (i.e. Succeeded with non-empty diff - changes present)
In this case, the return code is misleading since there is no infrastructure to destroy since nothing has been created as yet.
Steps to Reproduce
Run the following command
terraform plan -destroy -detailed-exitcodeAdditional Context
References