(params map[string]string)
| 27 | } |
| 28 | |
| 29 | func promptAWSProfilePicker(params map[string]string) error { |
| 30 | profiles, err := project.GetAWSProfiles() |
| 31 | if err != nil { |
| 32 | return err |
| 33 | } |
| 34 | |
| 35 | awsPrompt := PromptHandler{ |
| 36 | Parameter: moduleconfig.Parameter{ |
| 37 | Field: "aws_profile", |
| 38 | Label: "Select AWS Profile", |
| 39 | Options: listToPromptOptions(profiles), |
| 40 | }, |
| 41 | Condition: NoCondition, |
| 42 | Validate: NoValidation, |
| 43 | } |
| 44 | _, value := promptParameter(awsPrompt) |
| 45 | credErr := project.FillAWSProfile("", value, params) |
| 46 | if credErr != nil { |
| 47 | return errors.New("Failed to retrieve profile, falling back to User input") |
| 48 | } |
| 49 | return nil |
| 50 | } |
no test coverage detected