promptAllModules takes a map of all the modules and prompts the user for values for all the parameters Important: This is done here because in this step we share the parameter across modules, meaning if module A and B both asks for region, it will reuse the response for both (and is deduped during r
(modules map[string]moduleconfig.ModuleConfig, projectConfig *projectconfig.ZeroProjectConfig)
| 302 | // Important: This is done here because in this step we share the parameter across modules, |
| 303 | // meaning if module A and B both asks for region, it will reuse the response for both (and is deduped during runtime) |
| 304 | func promptAllModules(modules map[string]moduleconfig.ModuleConfig, projectConfig *projectconfig.ZeroProjectConfig) map[string]string { |
| 305 | parameterValues := availableProjectContext(projectConfig) |
| 306 | for _, config := range modules { |
| 307 | var err error |
| 308 | |
| 309 | parameterValues, err = PromptModuleParams(config, parameterValues) |
| 310 | if err != nil { |
| 311 | exit.Fatal("Exiting prompt(%s): %v\n", config.Name, err) |
| 312 | } |
| 313 | } |
| 314 | return parameterValues |
| 315 | } |
| 316 | |
| 317 | // availableProjectContext declares a list of variables usable in modules parameter prompt's execute step |
| 318 | func availableProjectContext(projectConfig *projectconfig.ZeroProjectConfig) map[string]string { |
no test coverage detected