Add description updating via worker status (#2197)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2022-06-15 15:50:36 -04:00
1 parent b3efe0eb3a
commit 4efbce3112
8 files changed
+84 -39

No files matched your search

+2
View File
@@ -587,6 +587,8 @@ func (c *Command) Run(args []string) int {
c.UI.Error("Worker Auth KMS not found after parsing KMS blocks")
return base.CommandUserError
}
c.Config.Worker.Name = ""
c.Config.Worker.Description = ""
c.InfoKeys = append(c.InfoKeys, "[Worker-Auth] AEAD Key Bytes")
c.Info["[Worker-Auth] AEAD Key Bytes"] = c.Config.DevWorkerAuthKey
}
+4
View File
@@ -197,6 +197,10 @@ func (c *Command) Run(args []string) int {
c.UI.Error("No worker auth KMS specified and no worker auth storage path specified.")
return base.CommandUserError
}
if c.Config.Worker.Name != "" || c.Config.Worker.Description != "" {
c.UI.Error("Worker config cannot contain name or description when using PKI-based worker authentication; it must be set via the API.")
return base.CommandUserError
}
default:
if c.Config.Worker.Name == "" {
c.UI.Error("Worker is using KMS auth but has no name set. It must be the unique name of this instance.")