Skip to content

Commit 37345f7

Browse files
authored
Merge pull request #155 from Appliscale/issue_152
Setting Stack Policy with a flag #152
2 parents 12ec5e7 + bc87f52 commit 37345f7

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ To apply your Stack Policy file you have to type:
137137
~ $ perun set-stack-policy <NAME OF YOUR STACK> <PATH TO YOUR TEMPLATE>
138138
```
139139

140-
or
141-
142-
```bash
143-
~ $ perun set-stack-policy --stack=<NAME OF YOUR STACK> --template=<PATH TO YOUR TEMPLATE>
144-
```
145-
146140
Perun has some default flags:
147141

148142
- ``--block`` - Block all Update actions in stack.

cliparser/cliparser.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ package cliparser
2020

2121
import (
2222
"errors"
23+
"time"
24+
2325
"github.com/Appliscale/perun/logger"
2426
"github.com/Appliscale/perun/utilities"
2527
"gopkg.in/alecthomas/kingpin.v2"
26-
"time"
2728
)
2829

2930
var ValidateMode = "validate"
@@ -157,7 +158,7 @@ func ParseCliArguments(args []string) (cliArguments CliArguments, err error) {
157158

158159
setStackPolicy = app.Command(SetStackPolicyMode, "Set stack policy using JSON file.")
159160
setStackPolicyName = setStackPolicy.Arg("stack", "An AWS stack name.").Required().String()
160-
setStackPolicyTemplate = setStackPolicy.Arg("template", "A path to the template file.").Required().String()
161+
setStackPolicyTemplate = setStackPolicy.Arg("template", "A path to the template file.").String()
161162
setDefaultBlockingStackPolicy = setStackPolicy.Flag("block", "Blocking all actions.").Bool()
162163
setDefaultUnblockingStackPolicy = setStackPolicy.Flag("unblock", "Unblocking all actions.").Bool()
163164
setDisableStackTermination = setStackPolicy.Flag("disable-stack-termination", "Allow to delete a stack.").Bool()

0 commit comments

Comments
 (0)