diff --git a/.changelog/18140.txt b/.changelog/18140.txt index e02ab33bceb2..fabd9fc2916b 100644 --- a/.changelog/18140.txt +++ b/.changelog/18140.txt @@ -1,3 +1,3 @@ ```release-note:improvement -cloud: Removes requirement for HCP to provide a management token +hcp: Removes requirement for HCP to provide a management token ``` diff --git a/agent/hcp/bootstrap/bootstrap.go b/agent/hcp/bootstrap/bootstrap.go index 320b36107313..191859ea002b 100644 --- a/agent/hcp/bootstrap/bootstrap.go +++ b/agent/hcp/bootstrap/bootstrap.go @@ -298,6 +298,8 @@ func persistAndProcessConfig(dataDir string, devMode bool, bsCfg *hcpclient.Boot return "", fmt.Errorf("failed to persist bootstrap config: %w", err) } + // HCP only returns the management token if it requires Consul to + // initialize it if bsCfg.ManagementToken != "" { if err := validateManagementToken(bsCfg.ManagementToken); err != nil { return "", fmt.Errorf("invalid management token: %w", err)