terraform-github-actions icon indicating copy to clipboard operation
terraform-github-actions copied to clipboard

Output if workspace was existing or new in terraform-new-workspace

Open ed0906 opened this issue 5 months ago • 0 comments

Suggestion

It would be useful if the terraform-new-workspace action could output if the workspace was new, or existing.

Example use case: We have a Github Action with runs a terraform plan for each of our environments for PRs. Part of this involves creating/checking out the workspace using terraform-new-workspace (as the workspace could be new, but generally wouldn't be). For the scenarios where the workspace is new, I don't like the idea of leaving it hanging around just for the sake of a plan, so if it was a new workspace it'd be useful to be able to delete it after the plan is generated.

This is only possible if we know whether the workspace is new or not. An added action output was-existing, or something named to similar effect would really help with this.

ed0906 avatar May 13 '25 11:05 ed0906