Skip to content

Commit

Permalink
Merge pull request #205 from banzaicloud/fix-provider-config-for-ec2
Browse files Browse the repository at this point in the history
Make the providerConfig be persisted explicitly in all cases if it's not empty
  • Loading branch information
pepov authored Feb 25, 2020
2 parents c4ecbb4 + 4a271dd commit c2546c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cli/command/controlplane/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ func runInit(options initOptions, banzaiCli cli.Cli) error {
out[externalHost] = guessExternalAddr()

case providerCustom:
out["providerConfig"] = providerConfig

source := "/export"

hasExports, err := imageFileExists(options.cpContext, source)
Expand Down Expand Up @@ -387,7 +385,10 @@ func runInit(options initOptions, banzaiCli cli.Cli) error {
return errors.New("Custom provisioning is available by specifying a custom installer image. Please refer to your deployment guide or use one of our support channels.")
}
}
}

if len(providerConfig) > 0 {
out["providerConfig"] = providerConfig
}

err = options.ensureImagePulled()
Expand Down

0 comments on commit c2546c8

Please sign in to comment.