Good day all, I'm doing a very simple api on an ap...
# azure
c
Good day all, I'm doing a very simple api on an app service. I'm using the the managed certs and so far the steps i believe i need are the following:
Copy code
const recordSet = new azure_native.network.RecordSet("recordSet", {
    cnameRecord: {
        cname: pulumi.interpolate`${app.defaultHostName}`,
    },
    metadata: {
        key1: "dev",
    },
    recordType: "CNAME",
    relativeRecordSetName: "dev",
    resourceGroupName: "rg",
    ttl: 60,
    zoneName: "<http://mycooldomain.com|mycooldomain.com>",
});


const webappbinding = new web.WebAppHostNameBinding("binding",{
    name: pulumi.interpolate`${app.name}`,
    resourceGroupName:resourceGroup.name,
    customHostNameDnsRecordType: 'CName',
    hostName:'<http://dev.mycooldomain.com|dev.mycooldomain.com>',
    hostNameType:'Verified',
    azureResourceType: 'Website'
});


const managedcertificate = new web.Certificate("cert",{
    //hostNames: app.hostNames,
    name:"devcert",
    canonicalName: "<http://dev.mycooldomain.com|dev.mycooldomain.com>",
    resourceGroupName: resourceGroup.name,
    serverFarmId: appServicePlan.id
});


const customDomain = new azure_native.appplatform.CustomDomain("customDomain",{
    appName: app.name,
    domainName: '<http://dev.mycooldomain.com|dev.mycooldomain.com>',
    properties:{
        certName: 'devcert',
        thumbprint: managedcertificate.thumbprint
    },
    resourceGroupName:resourceGroup.name,
    serviceName: "????"
});
My question is i can't figure out what it's referring to when it's asking for a 'serviceName' on the last line. If someone could point in the documentation where i would find the reference that would be amazing. Cheers!
w
I believe it's the name of an appplatform.service resource. https://www.pulumi.com/registry/packages/azure-native/api-docs/appplatform/service/
a
hi, I'm trying to do exactly the same thing. Pulumi is creating everything up to the custom domain but if I pass my AppServicePlan name as the serviceName I get a Code="ParentResourceNotFound" error. I don't understand what specifically the app platform "service" actually is, can anyone shed any light on this for me? (thanks)