Skip to content

Commit

Permalink
Fix missing deployment service account (#329)
Browse files Browse the repository at this point in the history
* fix missing deployment service account

* fix small typos
  • Loading branch information
andriisoldatenko committed May 5, 2020
1 parent 247f677 commit fa195c8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cmd/deployment.go
Expand Up @@ -32,9 +32,16 @@ var (
deploymentSaCreateExample = `
# Create service-account
$ astro deployment service-account create --deployment-uuid=xxxxx --label=my_label --role=ROLE
`
deploymentSaGetExample = `
# Get deployment service-account
$ astro deployment service-account get <service-account-id> --deployment-id=<deployment-id>
# or using deployment-id
$ astro deployment service-account get --deployment-id=<deployment-id>
`
deploymentSaDeleteExample = `
$ astro workspace service-account delete <service-account-id> --workspace-id=<workspace-id>
$ astro deployment service-account delete <service-account-id> --deployment-id=<deployment-id>
`
deploymentUpdateAttrs = []string{"label"}
)
Expand Down Expand Up @@ -156,10 +163,13 @@ func newDeploymentSaGetCmd(client *houston.Client, out io.Writer) *cobra.Command
Use: "get",
Short: "Get a service-account by entity type and entity id",
Long: "Get a service-account by entity type and entity id",
Example: deploymentSaGetExample,
RunE: func(cmd *cobra.Command, args []string) error {
return deploymentSaGet(cmd, client, out)
},
}
cmd.Flags().StringVarP(&deploymentId, "deployment-id", "d", "", "[ID]")
cmd.MarkFlagRequired("deployment-id")
return cmd
}

Expand All @@ -175,7 +185,7 @@ func newDeploymentSaDeleteCmd(client *houston.Client, out io.Writer) *cobra.Comm
},
Args: cobra.ExactArgs(1),
}
cmd.Flags().StringVarP(&workspaceId, "deployment-id", "w", "", "[ID]")
cmd.Flags().StringVarP(&deploymentId, "deployment-id", "d", "", "[ID]")
cmd.MarkFlagRequired("deployment-id")
return cmd
}
Expand Down

0 comments on commit fa195c8

Please sign in to comment.