File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
cmd/dlt/iamserviceaccount Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,19 @@ func DeleteIamServiceAccountRunner(userOptions *iamServiceAccountOpts.DeleteIamS
7373 serviceAccountName := userOptions .ServiceAccountName
7474 namespace := userOptions .Namespace
7575
76- if roleName == "" {
76+ useExplicitRoleName , err := interactive .GetBool (interactive.Input {
77+ Question : "Do you want to provide an explicit role name" ,
78+ Help : "Whether or not to delete based on an explicit role name. If you choose 'No' to this prompt," +
79+ " you will be prompted for a service account name and namespace to generate the iam service account " +
80+ "role name to delete." ,
81+ Required : true ,
82+ Default : true ,
83+ })
84+ if err != nil {
85+ return fmt .Errorf ("expected a valid response to yes/no prompt: %s" , err )
86+ }
87+
88+ if ! useExplicitRoleName {
7789 // Need service account details to derive role name
7890 if interactive .Enabled () && serviceAccountName == "" {
7991 serviceAccountName , err = interactive .GetString (interactive.Input {
You can’t perform that action at this time.
0 commit comments