Skip to content

Commit

Permalink
Merge pull request #155 from Appliscale/issue_152
Browse files Browse the repository at this point in the history
Setting Stack Policy with a flag #152
  • Loading branch information
maxiwoj authored Sep 5, 2018
2 parents 12ec5e7 + bc87f52 commit 37345f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ To apply your Stack Policy file you have to type:
~ $ perun set-stack-policy <NAME OF YOUR STACK> <PATH TO YOUR TEMPLATE>
```

or

```bash
~ $ perun set-stack-policy --stack=<NAME OF YOUR STACK> --template=<PATH TO YOUR TEMPLATE>
```

Perun has some default flags:

- ``--block`` - Block all Update actions in stack.
Expand Down
5 changes: 3 additions & 2 deletions cliparser/cliparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ package cliparser

import (
"errors"
"time"

"github.com/Appliscale/perun/logger"
"github.com/Appliscale/perun/utilities"
"gopkg.in/alecthomas/kingpin.v2"
"time"
)

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

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

0 comments on commit 37345f7

Please sign in to comment.