Skip to content

Commit

Permalink
set custom_metadata to nil for vault versions <=1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-gopalan committed Oct 4, 2023
1 parent 1d9c42b commit 0564c3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vault/resource_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ func namespaceRead(ctx context.Context, d *schema.ResourceData, meta interface{}

if provider.IsAPISupported(meta, provider.VaultVersion112) {
toSet[consts.FieldCustomMetadata] = resp.Data[consts.FieldCustomMetadata]
} else {
// set computed parameter to nil for vault versions <= 1.11
// prevents 'known after apply' drift in TF state since field
// would never be set otherwise
toSet[consts.FieldCustomMetadata] = nil
}

pathFQ := path
Expand Down

0 comments on commit 0564c3e

Please sign in to comment.