Skip to content

Commit b5b65d3

Browse files
committed
infra: bind optimizer.evcc.io custom domain in bicep
Previously the custom hostname was bound out-of-band, so bicep deploys stripped the binding and clients hit TLS RSTs (evcc-io/evcc#28795). References the existing managed certificate in the environment.
1 parent 29dce04 commit b5b65d3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

infra/main.bicep

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2025-02-01' = {
2828
}
2929
}
3030

31+
@description('Custom hostname served by the container app')
32+
param customHostname string = 'optimizer.evcc.io'
33+
34+
@description('Name of the existing managed certificate in the environment for customHostname')
35+
param managedCertificateName string = 'mc-optimizer-env-optimizer-evcc-i-5846'
36+
3137
resource containerAppEnv 'Microsoft.App/managedEnvironments@2025-01-01' = {
3238
name: 'optimizer-env'
3339
location: location
@@ -54,6 +60,13 @@ resource containerApp 'Microsoft.App/containerApps@2025-01-01' = {
5460
ingress: {
5561
external: true
5662
targetPort: 7050
63+
customDomains: [
64+
{
65+
name: customHostname
66+
bindingType: 'SniEnabled'
67+
certificateId: '${containerAppEnv.id}/managedCertificates/${managedCertificateName}'
68+
}
69+
]
5770
}
5871
secrets: [
5972
{

0 commit comments

Comments
 (0)