Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs

This commit is contained in:
Jeff Mitchell committed 2021-10-27 21:57:30 -04:00
commit b1a72bd445
69 files changed
+1213 -277

No files matched your search

+4 -1
View File
@@ -510,7 +510,6 @@ func (b *Server) CreateInitialTarget(ctx context.Context) (target.Target, error)
target.WithName("Generated target"),
target.WithDescription("Provides an initial target in Boundary"),
target.WithDefaultPort(uint32(b.DevTargetDefaultPort)),
target.WithHostSources([]string{b.DevHostSetId}),
target.WithSessionMaxSeconds(uint32(b.DevTargetSessionMaxSeconds)),
target.WithSessionConnectionLimit(int32(b.DevTargetSessionConnectionLimit)),
target.WithPublicId(b.DevTargetId),
@@ -523,6 +522,10 @@ func (b *Server) CreateInitialTarget(ctx context.Context) (target.Target, error)
if err != nil {
return nil, fmt.Errorf("error saving target to the db: %w", err)
}
tt, _, _, err = targetRepo.AddTargetHostSources(ctx, tt.GetPublicId(), tt.GetVersion(), []string{b.DevHostSetId})
if err != nil {
return nil, fmt.Errorf("error saving target to the db: %w", err)
}
b.InfoKeys = append(b.InfoKeys, "generated target id")
b.Info["generated target id"] = b.DevTargetId