| 415 | } |
| 416 | |
| 417 | func parseSelectOptions(opts *CreateOptions, controlType resources.ControlType) []*resources.SelectOption { |
| 418 | options := []*resources.SelectOption{} |
| 419 | if controlType != resources.ControlTypeSelect { |
| 420 | return options |
| 421 | } |
| 422 | |
| 423 | for _, selectOption := range opts.PromptSelectOptions.Value { |
| 424 | o := strings.Split(selectOption, "|") |
| 425 | options = append(options, &resources.SelectOption{ |
| 426 | Value: o[0], |
| 427 | DisplayName: o[1], |
| 428 | }) |
| 429 | } |
| 430 | |
| 431 | return options |
| 432 | } |
| 433 | |
| 434 | func mapVariableType(varType string) (string, error) { |
| 435 | if varType == "" { |