mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-03 11:00:09 -05:00
e844ceb2b1
* adapt to Cobra CLI ref style * linting * change multi-line reference style * lowercase short descriptions * Revert "lowercase short descriptions" This reverts commit 499dc3577a0b16859027e0fba88dc22a4774223b. * use 2 newlines on long description and add dots * mark required flags * Update cli/internal/cmd/iamcreateaws.go Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> * Update cli/internal/cmd/upgradeexecute.go Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> * Update cli/internal/cmd/upgradeexecute.go Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewIAMCmd returns a new cobra.Command for the iam parent command. It needs another verb and does nothing on its own.
|
|
func NewIAMCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "iam",
|
|
Short: "Work with the IAM configuration on your cloud provider",
|
|
Long: "Work with the IAM configuration on your cloud provider.",
|
|
Args: cobra.ExactArgs(0),
|
|
}
|
|
|
|
cmd.AddCommand(newIAMCreateCmd())
|
|
|
|
return cmd
|
|
}
|
|
|
|
// NewIAMCreateCmd returns a new cobra.Command for the iam create parent command. It needs another verb, and does nothing on its own.
|
|
func newIAMCreateCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "create",
|
|
Short: "Create IAM configuration on a cloud platform for your Constellation cluster",
|
|
Long: "Create IAM configuration on a cloud platform for your Constellation cluster.",
|
|
Args: cobra.ExactArgs(0),
|
|
}
|
|
|
|
cmd.PersistentFlags().Bool("generate-config", false, "automatically generate a configuration file and fill in the required fields")
|
|
|
|
cmd.AddCommand(newIAMCreateAWSCmd())
|
|
cmd.AddCommand(newIAMCreateAzureCmd())
|
|
cmd.AddCommand(newIAMCreateGCPCmd())
|
|
|
|
return cmd
|
|
}
|