Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Opentofu
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DBS
gitlab-component
Opentofu
Commits
de9b9e37
Unverified
Commit
de9b9e37
authored
1 year ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Support input in plan job to generate a destroy plan
parent
a990ad18
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/plan.yml
+12
-1
12 additions, 1 deletion
templates/plan.yml
with
12 additions
and
1 deletion
templates/plan.yml
+
12
−
1
View file @
de9b9e37
...
@@ -42,6 +42,10 @@ spec:
...
@@ -42,6 +42,10 @@ spec:
state_name
:
state_name
:
default
:
default
default
:
default
description
:
'
Remote
OpenTofu
state
name.'
description
:
'
Remote
OpenTofu
state
name.'
destroy_plan
:
default
:
false
type
:
boolean
description
:
'
Set
to
`true`
to
generate
a
destroy
instead
of
an
apply
plan.'
---
---
...
@@ -78,5 +82,12 @@ spec:
...
@@ -78,5 +82,12 @@ 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 plan
-
|
if !$[[ inputs.destroy_plan ]]; then
echo "gitlab-tofu plan"
gitlab-tofu plan
else
echo "gitlab-tofu plan -destroy"
gitlab-tofu plan -destroy
fi
-
gitlab-tofu plan-json
-
gitlab-tofu plan-json
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment