Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #637 from simonswine/do-not-auto-approve-delete
Browse files Browse the repository at this point in the history
Do not auto-approve state deletes by default
  • Loading branch information
jetstack-bot authored Nov 21, 2018
2 parents 40b686d + 5aa6d98 commit 3214dda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/tarmak/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func clusterApplyFlags(fs *flag.FlagSet) {
fs.BoolVar(
&store.AutoApproveDeletingData,
"auto-approve-deleting-data",
true,
false,
"auto approve deletion of any data as a cause from applying cluster",
)

Expand Down
2 changes: 1 addition & 1 deletion docs/generated/cmd/tarmak/tarmak_clusters_apply.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Options
::

--auto-approve auto approve to responses when applying cluster (default true)
--auto-approve-deleting-data auto approve deletion of any data as a cause from applying cluster (default true)
--auto-approve-deleting-data auto approve deletion of any data as a cause from applying cluster
-C, --configuration-only apply changes to configuration only, by running only puppet
--dry-run don't actually change anything, just show changes that would occur
-h, --help help for apply
Expand Down
2 changes: 1 addition & 1 deletion pkg/terraform/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func (t *Terraform) Plan(cluster interfaces.Cluster, preApply bool) (changesNeed
return changesNeeded, errors.New(destroyStr)
}

if t.tarmak.ClusterFlags().Apply.AutoApproveDeletingData || t.tarmak.ClusterFlags().Apply.AutoApprove {
if t.tarmak.ClusterFlags().Apply.AutoApproveDeletingData && t.tarmak.ClusterFlags().Apply.AutoApprove {
t.log.Warnf("auto approved deleting, %s", destroyStr)
return changesNeeded, nil
}
Expand Down

0 comments on commit 3214dda

Please sign in to comment.