diff --git a/api/config_entry_exports.go b/api/config_entry_exports.go index 020b68075501..dec9b6932a17 100644 --- a/api/config_entry_exports.go +++ b/api/config_entry_exports.go @@ -5,8 +5,6 @@ package api import ( "encoding/json" - - "github.com/hashicorp/consul/acl" ) // ExportedServicesConfigEntry manages the exported services for a single admin partition. @@ -89,7 +87,11 @@ type ResolvedExportedService struct { // Service is the name of the service which is exported. Service string - acl.EnterpriseMeta `hcl:",squash" mapstructure:",squash"` + // Partition of the service + Partition string `json:",omitempty"` + + // Namespace of the service + Namespace string `json:",omitempty"` // Consumers is a list of downstream consumers of the service. Consumers ResolvedConsumers diff --git a/proto/private/pbconfigentry/config_entry.go b/proto/private/pbconfigentry/config_entry.go index 63b71c7457d5..578dd92444ef 100644 --- a/proto/private/pbconfigentry/config_entry.go +++ b/proto/private/pbconfigentry/config_entry.go @@ -609,7 +609,11 @@ func (r *ResolvedExportedService) ToAPI() *api.ResolvedExportedService { var t api.ResolvedExportedService t.Service = r.Service - pbcommon.EnterpriseMetaToStructs(r.EnterpriseMeta, &t.EnterpriseMeta) + if r.EnterpriseMeta != nil { + t.Namespace = r.EnterpriseMeta.Namespace + t.Partition = r.EnterpriseMeta.Partition + } + t.Consumers.Peers = r.Consumers.Peers t.Consumers.Partitions = r.Consumers.Partitions