Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Feb 20, 2025

Backport of #7699 to release/9.1

/cc @eerhardt

Customer Impact

Customers are unable to use AsExisting on Azure PostgreSQL resources. Doing so causes failures at provisioning time - both F5 and azd up. The reason is because we are setting properties on the existing resource, which bicep doesn't allow.

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.

Testing

Manually tested using both password based auth and Entra ID auth to an existing Azure PostgreSQL database. Both work as expected. When using Entra ID, the current user gets added as an admin as expected. When using password auth, the user is expected to have the username/password of the existing server and pass it in via parameters.

Risk

Low. This change only affects existing Azure PostgreSQL resources and shouldn't affect other scenarios.

Regression?

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 #7694
@eerhardt eerhardt closed this Feb 20, 2025
@eerhardt eerhardt reopened this Feb 20, 2025
@danmoseley danmoseley added the Servicing-approved Approved for servicing release label Feb 20, 2025
@danmoseley danmoseley added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) security 🔐 and removed Servicing-approved Approved for servicing release labels Feb 20, 2025
@danmoseley danmoseley added this to the 9.1 milestone Feb 20, 2025
@danmoseley danmoseley requested review from eerhardt and removed request for eerhardt February 20, 2025 18:44
@danmoseley danmoseley added Servicing-approved Approved for servicing release and removed NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) labels Feb 20, 2025
@danmoseley danmoseley merged commit b78ef60 into release/9.1 Feb 20, 2025
70 checks passed
@danmoseley danmoseley deleted the backport/pr-7699-to-release/9.1 branch February 20, 2025 20:25
@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 10, 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 Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants