From 7e1c19128ceea80df271ac0e4c0ffa76dfa1b1cd Mon Sep 17 00:00:00 2001 From: Ben Ash Date: Fri, 10 Dec 2021 22:26:37 +0000 Subject: [PATCH] backport of commit 6d2e589f69ce7b500fde232b21d0f4c22d9597db --- vault/identity_store_aliases.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vault/identity_store_aliases.go b/vault/identity_store_aliases.go index 7d47a6e8bb328..b717f83ea92f6 100644 --- a/vault/identity_store_aliases.go +++ b/vault/identity_store_aliases.go @@ -8,7 +8,6 @@ import ( "github.com/golang/protobuf/ptypes" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-secure-stdlib/strutil" - "github.com/mitchellh/mapstructure" "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/helper/namespace" @@ -141,10 +140,7 @@ func (i *IdentityStore) handleAliasCreateUpdate() framework.OperationFunc { customMetadata := make(map[string]string) data, customMetadataExists := d.GetOk("custom_metadata") if customMetadataExists { - err = mapstructure.Decode(data, &customMetadata) - if err != nil { - return nil, err - } + customMetadata = data.(map[string]string) } // Get entity id