Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing deployment service account #329

Merged
merged 2 commits into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 12 additions & 2 deletions cmd/deployment.go
Original file line number Diff line number Diff line change
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