feat(cmd): Default to azure plugin when performing db migration (#5422)

pull/5425/head
Hugo 1 year ago committed by GitHub
parent 71af25f584
commit 346ac58fa3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -180,14 +180,14 @@ func (c *MigrateCommand) Run(args []string) (retCode int) {
return base.CommandCliError return base.CommandCliError
} }
_, awsCleanup, err := external_plugins.CreateHostPlugin( _, plgCleanup, err := external_plugins.CreateHostPlugin(
c.Context, c.Context,
"aws", "azure",
external_plugins.WithPluginOptions( external_plugins.WithPluginOptions(
pluginutil.WithPluginExecutionDirectory(c.Config.Plugins.ExecutionDir), pluginutil.WithPluginExecutionDirectory(c.Config.Plugins.ExecutionDir),
pluginutil.WithPluginsFilesystem(boundary_plugin_assets.PluginPrefix, boundary_plugin_assets.FileSystem()), pluginutil.WithPluginsFilesystem(boundary_plugin_assets.PluginPrefix, boundary_plugin_assets.FileSystem()),
), ),
external_plugins.WithLogger(pluginLogger.Named("aws")), external_plugins.WithLogger(pluginLogger.Named("azure")),
) )
if err != nil { if err != nil {
c.UI.Error(fmt.Errorf("Error creating dynamic host plugin: %w", err).Error()) c.UI.Error(fmt.Errorf("Error creating dynamic host plugin: %w", err).Error())
@ -215,7 +215,7 @@ plugins {
"We are committed to resolving any issues as quickly as possible.")) "We are committed to resolving any issues as quickly as possible."))
return base.CommandCliError return base.CommandCliError
} }
if err := awsCleanup(); err != nil { if err := plgCleanup(); err != nil {
c.UI.Error(fmt.Errorf("Error running plugin cleanup function: %w", err).Error()) c.UI.Error(fmt.Errorf("Error running plugin cleanup function: %w", err).Error())
return base.CommandCliError return base.CommandCliError
} }

Loading…
Cancel
Save