Skip to content
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

Custom domain name for Container app #1498

Closed
KSemenenko opened this issue Dec 26, 2023 · 11 comments
Closed

Custom domain name for Container app #1498

KSemenenko opened this issue Dec 26, 2023 · 11 comments
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure

Comments

@KSemenenko
Copy link

I think we need an option to setup custom domain name for Container app
https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-integrations Issues pertaining to Aspire Integrations packages label Dec 26, 2023
@KSemenenko
Copy link
Author

@eerhardt eerhardt added area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication and removed area-integrations Issues pertaining to Aspire Integrations packages labels Jan 22, 2024
@mitchdenny
Copy link
Member

We'll probably have this partially solved with the stuff that @davidfowl is doing around Bicep template support. But the trick will be how we tell the container app to apply the custom domain. This would probably be a good use of metadata.

@KSemenenko
Copy link
Author

As I understands it’s impossible to do with bicep, because there is a step for validation, but it means app should be up an d running.
Maybe it’s possible with mix mix of bixep to create resource, and then one more action to bind cert and domain

@davidfowl
Copy link
Member

This is going to be out of scope for automatic deployment via aspire for GA.

@adanbrownpaca
Copy link

My first Aspire app is now deployed to production. Yup, this is a problem. Each time we update the deployment, the container loses the custom domain information. Public domain, of course. I'll follow this issue as it is a critical problem that every company will have.

@davidfowl
Copy link
Member

azd is looking to work around this issue with an opt in feature Azure/azure-dev#3955

@rudiv
Copy link

rudiv commented Jun 11, 2024

Until that feature lands, @adanbrownpaca you can use azd infra synth to correct this in the relevant container app's YAML file (they go in to /infra/{project}.tmpl.yaml).

Under ingress, add customDomains as so:

      customDomains:
        - name: { DomainName }
          bindingType: SniEnabled
          certificateId: "{{ .Env.AZURE_CONTAINER_APPS_ENVIRONMENT_ID }}/managedCertificates/{ Certificate Id }"

Making sure, of course, to replace the single { } with actual values. You can retrieve the certificate ID by using az container app env certificate list.

Note that you'll have to do this after the first deployment and manual configuration from portal. There's a wider issue with the Bicep support for ACA that isn't yet fixed that prevents even third party Bicep writing tools to implement this. See microsoft/azure-container-apps#796

@adanbrownpaca
Copy link

Thanks @rudiv - will do.

@davidfowl
Copy link
Member

Or you can use the daily build of azd and test the feature out 😄

@adanbrownpaca
Copy link

Two birds... got it! Will do @davidfowl

@davidfowl davidfowl added azure Issues associated specifically with scenarios tied to using Azure area-integrations Issues pertaining to Aspire Integrations packages and removed area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Sep 8, 2024
@davidfowl
Copy link
Member

Closing in favor of #6271

@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
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 azure Issues associated specifically with scenarios tied to using Azure
Projects
None yet
Development

No branches or pull requests

6 participants