diff --git a/vault/core.go b/vault/core.go index ab829b8e6605..a37c0bfaee69 100644 --- a/vault/core.go +++ b/vault/core.go @@ -1937,11 +1937,15 @@ func (s standardUnsealStrategy) unseal(ctx context.Context, logger log.Logger, c if err := c.setupAuditedHeadersConfig(ctx); err != nil { return err } + } else { + c.auditBroker = NewAuditBroker(c.logger) + } + + if !c.ReplicationState().HasState(consts.ReplicationPerformanceSecondary | consts.ReplicationDRSecondary) { + //Cannot do this above, as we need other resources like mounts to be setup if err := c.setupPluginReload(); err != nil { return err } - } else { - c.auditBroker = NewAuditBroker(c.logger) } if c.getClusterListener() != nil && (c.ha != nil || shouldStartClusterListener(c)) {