Skip to content

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

@ed0906

Description

@ed0906

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions