Skip to content

Commit

Permalink
Merge pull request #27 from dddwa/fix/ensure-custom-domain
Browse files Browse the repository at this point in the history
Fix/ensure custom domain
  • Loading branch information
JakeGinnivan authored Nov 11, 2024
2 parents 6f0a188 + f2095ec commit 43e47df
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
9 changes: 9 additions & 0 deletions infra/app/ddd.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ param name string
param location string = resourceGroup().location
param tags object = {}

param domainName string
param certificateId string
param identityName string
param containerRegistryName string
param containerAppsEnvironmentName string
Expand Down Expand Up @@ -71,6 +73,13 @@ resource app 'Microsoft.App/containerApps@2024-03-01' = {
external: true
targetPort: 80
transport: 'auto'
customDomains: [
{
bindingType: 'SniEnabled'
certificateId: certificateId
name: domainName
}
]
}
registries: [
{
Expand Down
7 changes: 7 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ param googleFormsApiKey string
@secure()
param googleFormsFileId string

@minLength(1)
param domainName string
@minLength(1)
param certificateId string

// Tags that should be applied to all resources.
//
// Note that 'azd-service-name' tags should be applied separately to service host resources.
Expand Down Expand Up @@ -118,6 +123,8 @@ module ddd './app/ddd.bicep' = {
gitHubToken: gitHubToken
googleFormsApiKey: googleFormsApiKey
googleFormsFileId: googleFormsFileId
domainName: domainName
certificateId: certificateId
}
scope: rg
}
Expand Down
8 changes: 7 additions & 1 deletion infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
},
"googleFormsFileId": {
"value": "${GOOGLE_FORMS_FILE_ID}"
},
"domainName": {
"value": "dddperth.com"
},
"certificateId": {
"value": "cloudflare"
}
}
}
}

0 comments on commit 43e47df

Please sign in to comment.