Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 18, 2025

The "Configure Azure Container Apps environments" article previously only showed how to add tags to container environments. This update enhances the article with comprehensive examples demonstrating how to set the container environment name and other common properties.

Changes Made

Updated Code Example: The ConfigureInfrastructure example now demonstrates:

  • Setting a custom name for the environment instead of using auto-generated names
  • Explicitly configuring the location property
  • Adding multiple tags for environment metadata and organization

New Code Snippet: Created ProgramCustomized.cs with a complete working example that follows established .NET Aspire patterns:

  • Uses proper Azure Provisioning namespaces
  • Follows the infra parameter naming convention
  • Uses .Single() for resource retrieval (consistent with other examples)

Enhanced Documentation: Added clear explanations for each configuration step and included a note referencing Azure documentation for additional configuration options.

Example of the new configuration:

acaEnv.ConfigureInfrastructure(infra =>
{
    var resources = infra.GetProvisionableResources();
    var containerEnvironment = resources.OfType<ContainerAppManagedEnvironment>().Single();

    // Set a custom name for the environment
    containerEnvironment.Name = "my-custom-aca-environment";
    
    // Set the location
    containerEnvironment.Location = "East US";
    
    // Add tags for metadata and organization
    containerEnvironment.Tags.Add("Environment", "Production");
    containerEnvironment.Tags.Add("Project", "MyAspireApp");
    containerEnvironment.Tags.Add("Owner", "Development Team");
});

This addresses the community feedback requesting examples of how to set environment names and provides developers with practical guidance for customizing Azure Container Apps environments in .NET Aspire.

Fixes #4722.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Modify the "Configure Azure Container Apps environments" article to describe how to set the container environment name Enhance ACA environments article with environment name configuration examples Sep 18, 2025
@Copilot Copilot AI requested a review from davidfowl September 18, 2025 16:16
Copilot finished work on behalf of davidfowl September 18, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify the "Configure Azure Container Apps environments" article to describe how to set the container environment name
2 participants