8000 Don't set properties on existing Azure SQL server resources by captainsafia · Pull Request #7705 · dotnet/aspire · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't set properties on existing Azure SQL server resources #7705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

captainsafia
Copy link
Member
@captainsafia captainsafia commented Feb 20, 2025

Description

Avoid setting fields that will be emitted in the properties of the Bicep file for Azure SQL server resources that already exist. Instead, add a SQL Admin through SqlServerAzureADAdministrator child resource.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@Copilot Copilot AI review requested due to automatic review settings February 20, 2025 03:21
Copy link
Contributor
@Copilot Copilot AI left a comment

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.

@captainsafia captainsafia force-pushed the safia/azure-sql-existing branch from b030fef to 8d73431 Compare February 20, 2025 03:55
captainsafia and others added 2 commits February 19, 2025 20:06

/// <remarks>
/// Workaround for issue using SqlServerAzureADAdministrator.
/// See https://github.com/Azure/azure-sdk-for-net/issues/48364 for more information.
Copy link
Member

Choose a reason for hiding this comment

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

FYI @tg-msft - this is how we figured to work around this issue.

return new StringLiteralExpression("ActiveDirectory");
}

protected override void DefineProvisionableProperties()
Copy link
Member

Choose a reason for hiding this comment

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

@tg-msft this is the workaround, notice we don't call base here. We just define the 4 properties we need.

Copy link
Member
@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

Hopefully we can remove the workaround once the Azure.Provisioning issue is fixed.

I think we should backport this to 9.1.

@captainsafia captainsafia merged commit 9e7c91d into main Feb 20, 2025
70 checks passed
@captainsafia captainsafia deleted the safia/azure-sql-existing branch February 20, 2025 04:37
@captainsafia
Copy link
Member Author

/backport to release/9.1

Copy link
Contributor

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

@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication 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-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0