2023-04-10 15:36:59 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2017-09-11 17:46:17 +00:00
|
|
|
package command
|
|
|
|
|
2017-09-15 20:11:37 +00:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/mitchellh/cli"
|
|
|
|
)
|
2017-09-11 17:46:17 +00:00
|
|
|
|
|
|
|
type ACLCommand struct {
|
|
|
|
Meta
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *ACLCommand) Help() string {
|
2017-09-15 20:11:37 +00:00
|
|
|
helpText := `
|
2018-03-21 21:04:54 +00:00
|
|
|
Usage: nomad acl <subcommand> [options] [args]
|
2017-09-15 20:11:37 +00:00
|
|
|
|
2018-03-21 21:04:54 +00:00
|
|
|
This command groups subcommands for interacting with ACL policies and tokens.
|
|
|
|
Users can bootstrap Nomad's ACL system, create policies that restrict access,
|
|
|
|
and generate tokens from those policies.
|
2017-09-15 20:11:37 +00:00
|
|
|
|
2018-03-21 21:04:54 +00:00
|
|
|
Bootstrap ACLs:
|
|
|
|
|
|
|
|
$ nomad acl bootstrap
|
|
|
|
|
|
|
|
Please see the individual subcommand help for detailed usage information.
|
2017-09-15 20:11:37 +00:00
|
|
|
`
|
|
|
|
return strings.TrimSpace(helpText)
|
2017-09-11 17:46:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *ACLCommand) Synopsis() string {
|
|
|
|
return "Interact with ACL policies and tokens"
|
|
|
|
}
|
|
|
|
|
2018-04-18 16:02:11 +00:00
|
|
|
func (f *ACLCommand) Name() string { return "acl" }
|
|
|
|
|
2017-09-11 17:46:17 +00:00
|
|
|
func (f *ACLCommand) Run(args []string) int {
|
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|