Add AzureServiceTags with common Azure service tags for NSG rules#14452
Merged
eerhardt merged 2 commits intorelease/13.2from Feb 19, 2026
Merged
Add AzureServiceTags with common Azure service tags for NSG rules#14452eerhardt merged 2 commits intorelease/13.2from
eerhardt merged 2 commits intorelease/13.2from
Conversation
Copilot
AI
changed the title
[WIP] Add common from addresses for Azure service tags
Add AzureNetworkServiceTags with common Azure service tags for NSG rules
Feb 11, 2026
eerhardt
reviewed
Feb 11, 2026
eerhardt
reviewed
Feb 12, 2026
Copilot
AI
changed the title
Add AzureNetworkServiceTags with common Azure service tags for NSG rules
Add AzureServiceTags with common Azure service tags for NSG rules
Feb 12, 2026
Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com>
3a6d50c to
36ca680
Compare
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14452Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14452" |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new AzureServiceTags public API to the Azure Network hosting integration, giving users IntelliSense-friendly constants for common Azure NSG service-tag strings when authoring AzureSecurityRules or using VNet subnet shorthand rule methods.
Changes:
- Introduces
AzureServiceTagsstatic class with well-known Azure service tag constants. - Updates docs and examples to use
AzureServiceTagsinstead of magic strings. - Adds/updates unit tests to validate service tag usage in shorthand APIs and rule properties.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Hosting.Azure.Tests/AzureVirtualNetworkExtensionsTests.cs | Adds coverage validating service tags work in subnet shorthand methods and AzureSecurityRule properties. |
| tests/Aspire.Hosting.Azure.Tests/AzureNetworkSecurityGroupExtensionsTests.cs | Replaces hard-coded service tag strings with AzureServiceTags in tests. |
| src/Aspire.Hosting.Azure.Network/README.md | Updates README sample to use AzureServiceTags for discoverability. |
| src/Aspire.Hosting.Azure.Network/AzureVirtualNetworkExtensions.cs | Updates XML doc example to use AzureServiceTags. |
| src/Aspire.Hosting.Azure.Network/AzureServiceTags.cs | Adds the new public API and XML documentation. |
| playground/AzureVirtualNetworkEndToEnd/AzureVirtualNetworkEndToEnd.AppHost/Program.cs | Updates playground usage to use AzureServiceTags. |
sebastienros
approved these changes
Feb 18, 2026
Contributor
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22147860692 |
Member
|
This is a huge leap forward in capability. Loving it. |
radical
pushed a commit
to radical/aspire
that referenced
this pull request
Feb 19, 2026
…tnet#14452) * Add AzureServiceTags class with common Azure service tags and tests Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> * Use the new constants in more places. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eerhardt <8291187+eerhardt@users.noreply.github.com> Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
AzureServiceTagsstatic class providing well-known Azure service tag constants for use asfrom/toparameters in NSG rule methods andAzureSecurityRuleaddress prefix properties. This gives users discoverability via IntelliSense instead of requiring them to know the magic strings.Tags included:
Internet,VirtualNetwork,AzureLoadBalancer,AzureTrafficManager,Storage,Sql,AzureCosmosDB,AzureKeyVault,EventHub,ServiceBus,AzureContainerRegistry,AppService,AzureActiveDirectory,AzureMonitor,GatewayManagerChecklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue:💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.