Minor capitalization change

pull/2209/head
Jeff Mitchell 4 years ago
parent bd167da7d1
commit a589c32269

@ -353,10 +353,10 @@ func (c *Command) Run(args []string) int {
}
}
if c.Config.HCPBClusterId != "" {
_, err := uuid.ParseUUID(c.Config.HCPBClusterId)
if c.Config.HcpbClusterId != "" {
_, err := uuid.ParseUUID(c.Config.HcpbClusterId)
if err != nil {
c.UI.Error(fmt.Errorf("Invalid HCPB cluster id %q: %w", c.Config.HCPBClusterId, err).Error())
c.UI.Error(fmt.Errorf("Invalid HCP Boundary cluster id %q: %w", c.Config.HcpbClusterId, err).Error())
return base.CommandUserError
}
}

@ -126,7 +126,7 @@ type Config struct {
Plugins Plugins `hcl:"plugins"`
// Internal field for use with HCP deployments. Used if controllers/ initial_upstreams is not set
HCPBClusterId string `hcl:"hcp_boundary_cluster_id"`
HcpbClusterId string `hcl:"hcp_boundary_cluster_id"`
}
type Controller struct {

@ -59,10 +59,10 @@ func (w *Worker) StartControllerConnections() error {
}
if len(initialAddrs) == 0 {
if w.conf.RawConfig.HCPBClusterId != "" {
clusterAddress := fmt.Sprintf("%s%s", w.conf.RawConfig.HCPBClusterId, hcpbUrlSuffix)
if w.conf.RawConfig.HcpbClusterId != "" {
clusterAddress := fmt.Sprintf("%s%s", w.conf.RawConfig.HcpbClusterId, hcpbUrlSuffix)
initialAddrs = append(initialAddrs, resolver.Address{Addr: clusterAddress})
event.WriteSysEvent(w.baseContext, op, fmt.Sprintf("Setting HCPB Cluster address %s as upstream address", clusterAddress))
event.WriteSysEvent(w.baseContext, op, fmt.Sprintf("Setting HCP Boundary cluster address %s as upstream address", clusterAddress))
} else {
return errors.New("no initial upstream addresses found")
}

Loading…
Cancel
Save