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

Experimental custom domain support for ACA. #6275

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Conversation

mitchdenny
Copy link
Member

@mitchdenny mitchdenny commented Oct 13, 2024

Description

Adds custom domain support to the playground sample. The approach used here is that you deploy first without custom domains enabled (just hit enter on the certificateName value but provide the desired custom domain name.

Then once you've deployed for the first time go into the portal and go through the binding process for the custom domain and create the appropriate domain ownership verification steps (creating TXT/CNAME records etc).

Once the domain is up and running then you can deploy again, but this time edit the config.json file with the name of the certificate (look in the container app environment).

Opening this as a PR for now for discussion since we'll probably want to wrap this up in some kind of API. The API would need to augment the callback for configuring the custom domains but also inject parameters for each project its applied to.

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 (shipping as experimental)
      • 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?
Microsoft Reviewers: Open in CodeFlow

@mitchdenny mitchdenny force-pushed the midenn/custom-domains branch 2 times, most recently from efe5257 to 4158361 Compare October 16, 2024 11:27
@mitchdenny mitchdenny changed the title Playground with custom domain support. Experimental custom domain support for ACA. Oct 17, 2024
@mitchdenny mitchdenny marked this pull request as ready for review October 17, 2024 02:49
@mitchdenny
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

throw new ArgumentException("Cannot configure custom domain when resource is not parented by ResourceModuleConstruct.", nameof(app));
}

var containerAppManagedEnvironmentIdParameter = module.GetResources().OfType<ProvisioningParameter>().Single(
Copy link
Member

Choose a reason for hiding this comment

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

I don't love this part.

@mitchdenny mitchdenny merged commit 7fa8a02 into main Oct 21, 2024
9 checks passed
@mitchdenny mitchdenny deleted the midenn/custom-domains branch October 21, 2024 04:27
@mitchdenny
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspire/actions/runs/11433206663

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.

2 participants