diff --git a/api/gen/proto/go/teleport/discoveryconfig/v1/discoveryconfig.pb.go b/api/gen/proto/go/teleport/discoveryconfig/v1/discoveryconfig.pb.go index eb5da13e3d26d..193024237a630 100644 --- a/api/gen/proto/go/teleport/discoveryconfig/v1/discoveryconfig.pb.go +++ b/api/gen/proto/go/teleport/discoveryconfig/v1/discoveryconfig.pb.go @@ -275,6 +275,9 @@ type DiscoveryConfigStatus struct { DiscoveredResources uint64 `protobuf:"varint,3,opt,name=discovered_resources,json=discoveredResources,proto3" json:"discovered_resources,omitempty"` // last_sync_time is the timestamp when the Discovery Config was last sync. LastSyncTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_sync_time,json=lastSyncTime,proto3" json:"last_sync_time,omitempty"` + // AWSResourcesDiscovered contains all the AWS resources discovered. + // Does not include the AWS resources from Access Graph matchers. + AwsResourcesDiscovered []*AWSResourcesDiscovered `protobuf:"bytes,6,rep,name=aws_resources_discovered,json=awsResourcesDiscovered,proto3" json:"aws_resources_discovered,omitempty"` } func (x *DiscoveryConfigStatus) Reset() { @@ -337,6 +340,102 @@ func (x *DiscoveryConfigStatus) GetLastSyncTime() *timestamppb.Timestamp { return nil } +func (x *DiscoveryConfigStatus) GetAwsResourcesDiscovered() []*AWSResourcesDiscovered { + if x != nil { + return x.AwsResourcesDiscovered + } + return nil +} + +// AWSResourcesDiscovered represents the AWS resources that were discovered. +// Only resources found using integration credentials are reported. +type AWSResourcesDiscovered struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Integration is the Integration name used to fetch the resource. + Integration string `protobuf:"bytes,1,opt,name=integration,proto3" json:"integration,omitempty"` + // MatcherType is the type of resource that was discovered. + // Matches match the values defined at types.AWSMatcher.Types. + // Example values: ec2, rds, redshift, elasticache, memorydb + MatcherType string `protobuf:"bytes,2,opt,name=matcher_type,json=matcherType,proto3" json:"matcher_type,omitempty"` + // Found holds the count of resources found. + // After a resource is found, it starts the sync process and ends in either an enrolled or a failed resource. + Found uint64 `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"` + // Enrolled holds the count of the resources that were successfully enrolled. + Enrolled uint64 `protobuf:"varint,4,opt,name=enrolled,proto3" json:"enrolled,omitempty"` + // Failed holds the count of the resources that failed to enroll. + Failed uint64 `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"` +} + +func (x *AWSResourcesDiscovered) Reset() { + *x = AWSResourcesDiscovered{} + if protoimpl.UnsafeEnabled { + mi := &file_teleport_discoveryconfig_v1_discoveryconfig_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AWSResourcesDiscovered) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AWSResourcesDiscovered) ProtoMessage() {} + +func (x *AWSResourcesDiscovered) ProtoReflect() protoreflect.Message { + mi := &file_teleport_discoveryconfig_v1_discoveryconfig_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AWSResourcesDiscovered.ProtoReflect.Descriptor instead. +func (*AWSResourcesDiscovered) Descriptor() ([]byte, []int) { + return file_teleport_discoveryconfig_v1_discoveryconfig_proto_rawDescGZIP(), []int{3} +} + +func (x *AWSResourcesDiscovered) GetIntegration() string { + if x != nil { + return x.Integration + } + return "" +} + +func (x *AWSResourcesDiscovered) GetMatcherType() string { + if x != nil { + return x.MatcherType + } + return "" +} + +func (x *AWSResourcesDiscovered) GetFound() uint64 { + if x != nil { + return x.Found + } + return 0 +} + +func (x *AWSResourcesDiscovered) GetEnrolled() uint64 { + if x != nil { + return x.Enrolled + } + return 0 +} + +func (x *AWSResourcesDiscovered) GetFailed() uint64 { + if x != nil { + return x.Failed + } + return 0 +} + var File_teleport_discoveryconfig_v1_discoveryconfig_proto protoreflect.FileDescriptor var file_teleport_discoveryconfig_v1_discoveryconfig_proto_rawDesc = []byte{ @@ -383,8 +482,8 @@ var file_teleport_discoveryconfig_v1_discoveryconfig_proto_rawDesc = []byte{ 0x75, 0x62, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x53, 0x79, 0x6e, - 0x63, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x22, 0xb5, - 0x02, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, + 0x63, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x22, 0xa4, + 0x03, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x47, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, @@ -400,27 +499,45 @@ var file_teleport_discoveryconfig_v1_discoveryconfig_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, - 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52, 0x1c, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x63, - 0x32, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x2a, 0xa8, 0x01, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x26, 0x0a, 0x22, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, - 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x44, 0x49, 0x53, 0x43, 0x4f, - 0x56, 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x44, - 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x22, 0x0a, - 0x1e, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, - 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, - 0x03, 0x42, 0x62, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, - 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x6d, 0x0a, 0x18, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x57, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x52, 0x16, 0x61, 0x77, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52, 0x1c, 0x61, 0x77, 0x73, 0x5f, 0x65, 0x63, 0x32, + 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x65, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x41, 0x57, 0x53, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x65, + 0x6e, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x2a, + 0xa8, 0x01, 0x0a, 0x14, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x44, 0x49, 0x53, 0x43, + 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x22, 0x0a, 0x1e, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, + 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, + 0x45, 0x52, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x62, 0x5a, 0x60, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, + 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -436,36 +553,38 @@ func file_teleport_discoveryconfig_v1_discoveryconfig_proto_rawDescGZIP() []byte } var file_teleport_discoveryconfig_v1_discoveryconfig_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_teleport_discoveryconfig_v1_discoveryconfig_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_teleport_discoveryconfig_v1_discoveryconfig_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_teleport_discoveryconfig_v1_discoveryconfig_proto_goTypes = []any{ (DiscoveryConfigState)(0), // 0: teleport.discoveryconfig.v1.DiscoveryConfigState (*DiscoveryConfig)(nil), // 1: teleport.discoveryconfig.v1.DiscoveryConfig (*DiscoveryConfigSpec)(nil), // 2: teleport.discoveryconfig.v1.DiscoveryConfigSpec (*DiscoveryConfigStatus)(nil), // 3: teleport.discoveryconfig.v1.DiscoveryConfigStatus - (*v1.ResourceHeader)(nil), // 4: teleport.header.v1.ResourceHeader - (*types.AWSMatcher)(nil), // 5: types.AWSMatcher - (*types.AzureMatcher)(nil), // 6: types.AzureMatcher - (*types.GCPMatcher)(nil), // 7: types.GCPMatcher - (*types.KubernetesMatcher)(nil), // 8: types.KubernetesMatcher - (*types.AccessGraphSync)(nil), // 9: types.AccessGraphSync - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*AWSResourcesDiscovered)(nil), // 4: teleport.discoveryconfig.v1.AWSResourcesDiscovered + (*v1.ResourceHeader)(nil), // 5: teleport.header.v1.ResourceHeader + (*types.AWSMatcher)(nil), // 6: types.AWSMatcher + (*types.AzureMatcher)(nil), // 7: types.AzureMatcher + (*types.GCPMatcher)(nil), // 8: types.GCPMatcher + (*types.KubernetesMatcher)(nil), // 9: types.KubernetesMatcher + (*types.AccessGraphSync)(nil), // 10: types.AccessGraphSync + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp } var file_teleport_discoveryconfig_v1_discoveryconfig_proto_depIdxs = []int32{ - 4, // 0: teleport.discoveryconfig.v1.DiscoveryConfig.header:type_name -> teleport.header.v1.ResourceHeader + 5, // 0: teleport.discoveryconfig.v1.DiscoveryConfig.header:type_name -> teleport.header.v1.ResourceHeader 2, // 1: teleport.discoveryconfig.v1.DiscoveryConfig.spec:type_name -> teleport.discoveryconfig.v1.DiscoveryConfigSpec 3, // 2: teleport.discoveryconfig.v1.DiscoveryConfig.status:type_name -> teleport.discoveryconfig.v1.DiscoveryConfigStatus - 5, // 3: teleport.discoveryconfig.v1.DiscoveryConfigSpec.aws:type_name -> types.AWSMatcher - 6, // 4: teleport.discoveryconfig.v1.DiscoveryConfigSpec.azure:type_name -> types.AzureMatcher - 7, // 5: teleport.discoveryconfig.v1.DiscoveryConfigSpec.gcp:type_name -> types.GCPMatcher - 8, // 6: teleport.discoveryconfig.v1.DiscoveryConfigSpec.kube:type_name -> types.KubernetesMatcher - 9, // 7: teleport.discoveryconfig.v1.DiscoveryConfigSpec.access_graph:type_name -> types.AccessGraphSync + 6, // 3: teleport.discoveryconfig.v1.DiscoveryConfigSpec.aws:type_name -> types.AWSMatcher + 7, // 4: teleport.discoveryconfig.v1.DiscoveryConfigSpec.azure:type_name -> types.AzureMatcher + 8, // 5: teleport.discoveryconfig.v1.DiscoveryConfigSpec.gcp:type_name -> types.GCPMatcher + 9, // 6: teleport.discoveryconfig.v1.DiscoveryConfigSpec.kube:type_name -> types.KubernetesMatcher + 10, // 7: teleport.discoveryconfig.v1.DiscoveryConfigSpec.access_graph:type_name -> types.AccessGraphSync 0, // 8: teleport.discoveryconfig.v1.DiscoveryConfigStatus.state:type_name -> teleport.discoveryconfig.v1.DiscoveryConfigState - 10, // 9: teleport.discoveryconfig.v1.DiscoveryConfigStatus.last_sync_time:type_name -> google.protobuf.Timestamp - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 11, // 9: teleport.discoveryconfig.v1.DiscoveryConfigStatus.last_sync_time:type_name -> google.protobuf.Timestamp + 4, // 10: teleport.discoveryconfig.v1.DiscoveryConfigStatus.aws_resources_discovered:type_name -> teleport.discoveryconfig.v1.AWSResourcesDiscovered + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_teleport_discoveryconfig_v1_discoveryconfig_proto_init() } @@ -510,6 +629,18 @@ func file_teleport_discoveryconfig_v1_discoveryconfig_proto_init() { return nil } } + file_teleport_discoveryconfig_v1_discoveryconfig_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*AWSResourcesDiscovered); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_teleport_discoveryconfig_v1_discoveryconfig_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} @@ -518,7 +649,7 @@ func file_teleport_discoveryconfig_v1_discoveryconfig_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_teleport_discoveryconfig_v1_discoveryconfig_proto_rawDesc, NumEnums: 1, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/proto/teleport/discoveryconfig/v1/discoveryconfig.proto b/api/proto/teleport/discoveryconfig/v1/discoveryconfig.proto index c0c8560db017a..32df0e4f0b8d7 100644 --- a/api/proto/teleport/discoveryconfig/v1/discoveryconfig.proto +++ b/api/proto/teleport/discoveryconfig/v1/discoveryconfig.proto @@ -69,6 +69,10 @@ message DiscoveryConfigStatus { reserved 5; reserved "aws_ec2_instances_discovered"; + + // AWSResourcesDiscovered contains all the AWS resources discovered. + // Does not include the AWS resources from Access Graph matchers. + repeated AWSResourcesDiscovered aws_resources_discovered = 6; } // DiscoveryConfigState is the state of the discovery config resource. @@ -83,3 +87,21 @@ enum DiscoveryConfigState { // DISCOVERY_CONFIG_STATE_SYNCING is used when the discovery process has started but didn't finished yet. DISCOVERY_CONFIG_STATE_SYNCING = 3; } + +// AWSResourcesDiscovered represents the AWS resources that were discovered. +// Only resources found using integration credentials are reported. +message AWSResourcesDiscovered { + // Integration is the Integration name used to fetch the resource. + string integration = 1; + // MatcherType is the type of resource that was discovered. + // Matches match the values defined at types.AWSMatcher.Types. + // Example values: ec2, rds, redshift, elasticache, memorydb + string matcher_type = 2; + // Found holds the count of resources found. + // After a resource is found, it starts the sync process and ends in either an enrolled or a failed resource. + uint64 found = 3; + // Enrolled holds the count of the resources that were successfully enrolled. + uint64 enrolled = 4; + // Failed holds the count of the resources that failed to enroll. + uint64 failed = 5; +}