Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix Azure PostgreSQL AsExisting - #7699

#7699
Merged
eerhardt merged 1 commit into
microsoft:mainmicrosoft/aspire:mainfrom
eerhardt:FixExistingAzurePostgreseerhardt/aspire:FixExistingAzurePostgresCopy head branch name to clipboard
Feb 20, 2025
Merged

Fix Azure PostgreSQL AsExisting#7699
eerhardt merged 1 commit into
microsoft:mainmicrosoft/aspire:mainfrom
eerhardt:FixExistingAzurePostgreseerhardt/aspire:FixExistingAzurePostgresCopy head branch name to clipboard

Conversation

@eerhardt

Copy link
Copy Markdown
Member

Description

In bicep, it is not supported to set properties on "existing" resources. When using AsExisting on an Azure PostgreSQL resource, we are setting authConfig properties to enable/disable password and activeDirectory auth. This is causing errors when trying to deploy because the bicep is invalid.

Fix this by not setting these properties on existing resources. Instead for activeDirectory/Entra ID auth, we will add the principle as an admin on the server. For password auth on an existing resource, we expect the user to pass the correct username/password parameters to connect to the database server.

Fix #7694

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

In bicep, it is not supported to set properties on "existing" resources. When using AsExisting on an Azure PostgreSQL resource, we are setting authConfig properties to enable/disable password and activeDirectory auth. This is causing errors when trying to deploy because the bicep is invalid.

Fix this by not setting these properties on existing resources. Instead for activeDirectory/Entra ID auth, we will add the principle as an admin on the server. For password auth on an existing resource, we expect the user to pass the correct username/password parameters to connect to the database server.

Fix microsoft#7694

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@eerhardt
eerhardt merged commit f3b72d5 into microsoft:main Feb 20, 2025
@eerhardt
eerhardt deleted the FixExistingAzurePostgres branch February 20, 2025 01:40
@eerhardt

Copy link
Copy Markdown
Member Author

/backport to release/9.1

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.1: https://github.com/dotnet/aspire/actions/runs/13426042503

Comment thread src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresExtensions.cs
@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Mar 10, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure PostgreSQL AsExisting doesn't deploy successfully

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.