Skip to content
Snippets Groups Projects
Unverified Commit 700fdcc9 authored by Timo Furrer's avatar Timo Furrer
Browse files

Introduce plan argument to destroy job

parent de9b9e37
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,9 @@ spec: ...@@ -45,6 +45,9 @@ spec:
auto_destroy: auto_destroy:
default: 'false' default: 'false'
description: 'Whether the destroy job is manual or automatically run.' description: 'Whether the destroy job is manual or automatically run.'
plan:
default: ''
description: 'Path to a previously generated destroy plan.'
--- ---
...@@ -67,4 +70,11 @@ spec: ...@@ -67,4 +70,11 @@ spec:
image: image:
name: '$[[ inputs.image_registry_base ]]/gitlab-opentofu:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]' name: '$[[ inputs.image_registry_base ]]/gitlab-opentofu:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]'
script: script:
- gitlab-tofu destroy - |
if [ -z '$[[ inputs.plan ]]' ]; then
echo 'gitlab-tofu destroy'
gitlab-tofu destroy
else
echo 'gitlab-tofu destroy "$[[ inputs.plan ]]"'
gitlab-tofu destroy "$[[ inputs.plan ]]"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment