Skip to content

Commit

Permalink
Throw error if both principal-id and principal-name are used
Browse files Browse the repository at this point in the history
  • Loading branch information
wbreza committed Jul 26, 2023
1 parent d2d540d commit 3e280d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cli/azd/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

## 1.1.1 (Unreleased)

### Bugs Fixed

- [[2569]](https://github.com/Azure/azure-dev/pull/2569) Fix `azd down` so it works after a failed `azd provision`

### Features Added

- [[2550]](https://github.com/Azure/azure-dev/pull/2550) Add `--preview` to `azd provision` to get the changes
- [[2521]](https://github.com/Azure/azure-dev/pull/2521) Support `--principal-id` param for azd pipeline config to reuse existing service principal
- [[2455]](https://github.com/Azure/azure-dev/pull/2455) Adds optional support for text templates in AKS k8s manifests

### Bugs Fixed

- [[2569]](https://github.com/Azure/azure-dev/pull/2569) Fix `azd down` so it works after a failed `azd provision`
- [[2367]](https://github.com/Azure/azure-dev/pull/2367) Don't fail AKS deployment for failed environment substitution

## 1.1.0 (2023-07-12)
Expand Down
5 changes: 5 additions & 0 deletions cli/azd/pkg/pipeline/pipeline_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ func (pm *PipelineManager) Configure(ctx context.Context) (result *PipelineConfi
return result, fmt.Errorf("ensuring git remote: %w", err)
}

if pm.args.PipelineServicePrincipalName != "" && pm.args.PipelineServicePrincipalId != "" {
//nolint:lll
return result, fmt.Errorf("you have specified both --principal-id and --principal-name, but only one of these parameters should be used at a time.")
}

// Existing Service Principal Lookup strategy
// 1. --principal-id
// 2. --principal-name
Expand Down

0 comments on commit 3e280d6

Please sign in to comment.