Skip to content

Commit 004d06a

Browse files
committed
Rename to AddCustomDomain
1 parent b5256c5 commit 004d06a

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

playground/AzureContainerApps/AzureContainerApps.AppHost/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
.WithEnvironment("VALUE", param)
4040
.PublishAsAzureContainerApp((module, app) =>
4141
{
42-
app.ConfigureCustomDomain(customDomain, certificateName);
42+
app.AddCustomDomain(customDomain, certificateName);
4343

4444
// Scale to 0
4545
app.Template.Scale.MinReplicas = 0;

src/Aspire.Hosting.Azure.AppContainers/ContainerAppExtensions.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ namespace Aspire.Hosting;
1616
public static class ContainerAppExtensions
1717
{
1818
/// <summary>
19-
/// Configures the custom domain for the container app.
19+
/// Adds a custom domain to the container app.
2020
/// </summary>
21-
/// <param name="app">The container app resource to configure for custom domain usage.</param>
21+
/// <param name="app">The container app resource to add a custom domain.</param>
2222
/// <param name="customDomain">A resource builder for a parameter resource capturing the name of the custom domain.</param>
2323
/// <param name="certificateName">A resource builder for a parameter resource capturing the name of the certficate configured in the Azure Portal.</param>
2424
/// <exception cref="ArgumentException">Throws if the container app resource is not parented to a <see cref="AzureResourceInfrastructure"/>.</exception>
2525
/// <remarks>
26-
/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> extension method
26+
/// <para>The <see cref="AddCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> extension method
2727
/// simplifies the process of assigning a custom domain to a container app resource when it is deployed. It has no impact on local development.</para>
28-
/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method is used
28+
/// <para>The <see cref="AddCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method is used
2929
/// in conjunction with the <see cref="AzureContainerAppContainerExtensions.PublishAsAzureContainerApp{T}(IResourceBuilder{T}, Action{AzureResourceInfrastructure, ContainerApp})"/>
3030
/// callback. Assigning a custom domain to a container app resource is a multi-step process and requires multiple deployments.</para>
31-
/// <para>The <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method takes
31+
/// <para>The <see cref="AddCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/> method takes
3232
/// two arguments which are parameter resource builders. The first is a parameter that represents the custom domain and the second is a parameter that
3333
/// represents the name of the managed certificate provisioned via the Azure Portal</para>
34-
/// <para>When deploying with custom domains configured for the first time leave the <paramref name="certificateName"/> parameter empty (when prompted
34+
/// <para>When deploying with custom domains added for the first time leave the <paramref name="certificateName"/> parameter empty (when prompted
3535
/// by the Azure Developer CLI). Once the applicatio is deployed acucessfully access to the Azure Portal to bind the custom domain to a managed SSL
3636
/// certificate. Once the certificate is successfully provisioned, subsequent deployments of the application can use this certificate name when the
3737
/// <paramref name="certificateName"/> is prompted.</para>
@@ -40,7 +40,7 @@ public static class ContainerAppExtensions
4040
/// </remarks>
4141
/// <example>
4242
/// This example shows declaring two parameters to capture the custom domain and certificate name and
43-
/// passing them to the <see cref="ConfigureCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/>
43+
/// passing them to the <see cref="AddCustomDomain(ContainerApp, IResourceBuilder{ParameterResource}, IResourceBuilder{ParameterResource})"/>
4444
/// method via the <see cref="AzureContainerAppContainerExtensions.PublishAsAzureContainerApp{T}(IResourceBuilder{T}, Action{AzureResourceInfrastructure, ContainerApp})"/>
4545
/// extension method.
4646
/// <code lang="C#">
@@ -50,16 +50,16 @@ public static class ContainerAppExtensions
5050
/// builder.AddProject&lt;Projects.InventoryService&gt;("inventory")
5151
/// .PublishAsAzureContainerApp((module, app) =>
5252
/// {
53-
/// app.ConfigureCustomDomain(customDomain, certificateName);
53+
/// app.AddCustomDomain(customDomain, certificateName);
5454
/// });
5555
/// </code>
5656
/// </example>
5757
[Experimental("ASPIREACADOMAINS001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")]
58-
public static void ConfigureCustomDomain(this ContainerApp app, IResourceBuilder<ParameterResource> customDomain, IResourceBuilder<ParameterResource> certificateName)
58+
public static void AddCustomDomain(this ContainerApp app, IResourceBuilder<ParameterResource> customDomain, IResourceBuilder<ParameterResource> certificateName)
5959
{
6060
if (app.ParentInfrastructure is not AzureResourceInfrastructure module)
6161
{
62-
throw new ArgumentException("Cannot configure custom domain when resource is not parented by ResourceModuleConstruct.", nameof(app));
62+
throw new ArgumentException("Cannot add custom domain when resource is not parented by ResourceModuleConstruct.", nameof(app));
6363
}
6464

6565
var containerAppManagedEnvironmentIdParameter = module.GetProvisionableResources().OfType<ProvisioningParameter>().Single(

src/Aspire.Hosting.Azure.AppContainers/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ static Aspire.Hosting.AzureContainerAppContainerExtensions.PublishAsAzureContain
1111
static Aspire.Hosting.AzureContainerAppExecutableExtensions.PublishAsAzureContainerApp<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T!>! executable, System.Action<Aspire.Hosting.Azure.AzureResourceInfrastructure!, Azure.Provisioning.AppContainers.ContainerApp!>! configure) -> Aspire.Hosting.ApplicationModel.IResourceBuilder<T!>!
1212
static Aspire.Hosting.AzureContainerAppExtensions.AddAzureContainerAppsInfrastructure(this Aspire.Hosting.IDistributedApplicationBuilder! builder) -> Aspire.Hosting.IDistributedApplicationBuilder!
1313
static Aspire.Hosting.AzureContainerAppProjectExtensions.PublishAsAzureContainerApp<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T!>! project, System.Action<Aspire.Hosting.Azure.AzureResourceInfrastructure!, Azure.Provisioning.AppContainers.ContainerApp!>! configure) -> Aspire.Hosting.ApplicationModel.IResourceBuilder<T!>!
14-
static Aspire.Hosting.ContainerAppExtensions.ConfigureCustomDomain(this Azure.Provisioning.AppContainers.ContainerApp! app, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource!>! customDomain, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource!>! certificateName) -> void
14+
static Aspire.Hosting.ContainerAppExtensions.AddCustomDomain(this Azure.Provisioning.AppContainers.ContainerApp! app, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource!>! customDomain, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource!>! certificateName) -> void

tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ param outputs_azure_container_apps_environment_id string
10601060
}
10611061

10621062
[Fact]
1063-
public async Task ConfigureCustomDomainsMutatesIngress()
1063+
public async Task AddCustomDomainMutatesIngress()
10641064
{
10651065
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish);
10661066

@@ -1072,7 +1072,7 @@ public async Task ConfigureCustomDomainsMutatesIngress()
10721072
.WithHttpEndpoint(targetPort: 1111)
10731073
.PublishAsAzureContainerApp((module, c) =>
10741074
{
1075-
c.ConfigureCustomDomain(customDomain, certificateName);
1075+
c.AddCustomDomain(customDomain, certificateName);
10761076
});
10771077

10781078
using var app = builder.Build();
@@ -1176,7 +1176,7 @@ param customDomain string
11761176
}
11771177

11781178
[Fact]
1179-
public async Task ConfigureMultipleCustomDomainsMutatesIngress()
1179+
public async Task AddMultipleCustomDomainsMutatesIngress()
11801180
{
11811181
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish);
11821182

@@ -1191,8 +1191,8 @@ public async Task ConfigureMultipleCustomDomainsMutatesIngress()
11911191
.WithHttpEndpoint(targetPort: 1111)
11921192
.PublishAsAzureContainerApp((module, c) =>
11931193
{
1194-
c.ConfigureCustomDomain(customDomain1, certificateName1);
1195-
c.ConfigureCustomDomain(customDomain2, certificateName2);
1194+
c.AddCustomDomain(customDomain1, certificateName1);
1195+
c.AddCustomDomain(customDomain2, certificateName2);
11961196
});
11971197

11981198
using var app = builder.Build();

0 commit comments

Comments
 (0)