Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: lornasong <lornasong@users.noreply.github.com>
  • Loading branch information
jjacobson93 and lornasong authored Jul 20, 2023
1 parent 536e6f3 commit a99dd82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .changelog/18140.txt
Original file line number Diff line number Diff line change
@@ -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
```
2 changes: 2 additions & 0 deletions agent/hcp/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a99dd82

Please sign in to comment.