Update to go-kms-wrapping version 2, and plugin-based KMS (#1901)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2022-03-16 17:04:07 -04:00
1 parent 89273a2f3e
commit 7eb29261b2
209 files changed
+4054 -3025

No files matched your search

@@ -153,8 +153,15 @@ func (c *Command) Run(args []string) int {
}
client, err := c.Client()
if c.WrapperCleanupFunc != nil {
defer func() {
if err := c.WrapperCleanupFunc(); err != nil {
c.PrintCliError(fmt.Errorf("Error cleaning kms wrapper: %w", err))
}
}()
}
if err != nil {
c.PrintCliError(fmt.Errorf("Error creating API client: %s", err.Error()))
c.PrintCliError(fmt.Errorf("Error creating API client: %w", err))
return base.CommandCliError
}
managedgroupsClient := managedgroups.NewClient(client)
@@ -142,8 +142,15 @@ func (c *OidcCommand) Run(args []string) int {
}
client, err := c.Client()
if c.WrapperCleanupFunc != nil {
defer func() {
if err := c.WrapperCleanupFunc(); err != nil {
c.PrintCliError(fmt.Errorf("Error cleaning kms wrapper: %w", err))
}
}()
}
if err != nil {
c.PrintCliError(fmt.Errorf("Error creating API client: %s", err.Error()))
c.PrintCliError(fmt.Errorf("Error creating API client: %w", err))
return base.CommandCliError
}
managedgroupsClient := managedgroups.NewClient(client)