diff --git a/agent/consul/server_connect.go b/agent/consul/server_connect.go index f424437996..32b9ef3cb7 100644 --- a/agent/consul/server_connect.go +++ b/agent/consul/server_connect.go @@ -29,12 +29,12 @@ func (s *Server) getCARoots(ws memdb.WatchSet, state *state.Store) (*structs.Ind // defensive. return nil, fmt.Errorf("no cluster trust domain setup") } - - indexedRoots.TrustDomain = signingID.Host() - if indexedRoots.TrustDomain == "" { + if signingID.ClusterID == "" { return nil, fmt.Errorf("CA has not finished initializing") } + indexedRoots.TrustDomain = signingID.Host() + indexedRoots.Index, indexedRoots.Roots = index, roots if indexedRoots.Roots == nil { indexedRoots.Roots = make(structs.CARoots, 0)