mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-21 14:20:40 +00:00
Allow multiple backend-config options
This commit is contained in:
parent
eb649f82d7
commit
7b13306909
11
plugin.go
11
plugin.go
@ -31,9 +31,9 @@ type (
|
||||
}
|
||||
|
||||
InitOptions struct {
|
||||
BackendConfig string `json:"backend-config"`
|
||||
Lock *bool `json:"lock"`
|
||||
LockTimeout string `json:"lock-timeout"`
|
||||
BackendConfig []string `json:"backend-config"`
|
||||
Lock *bool `json:"lock"`
|
||||
LockTimeout string `json:"lock-timeout"`
|
||||
}
|
||||
|
||||
Plugin struct {
|
||||
@ -122,8 +122,9 @@ func initCommand(config InitOptions) *exec.Cmd {
|
||||
"init",
|
||||
}
|
||||
|
||||
if config.BackendConfig != "" {
|
||||
args = append(args, fmt.Sprintf("-backend-config=%s", config.BackendConfig))
|
||||
fmt.Printf("config.BackendConfig: %v\n", config.BackendConfig)
|
||||
for _, v := range config.BackendConfig {
|
||||
args = append(args, fmt.Sprintf("-backend-config=%s", v))
|
||||
}
|
||||
|
||||
// True is default in TF
|
||||
|
Loading…
Reference in New Issue
Block a user