https://pulumi.com logo
#general
Title
# general
s

shy-account-31313

02/04/2022, 10:22 AM
Hi there! I have set up an Azure Api Management service with Pulumi. Now trying to add a custom domain. I want to try out the managed certificate feature (in preview), but can't find a way to set it up using Pulumi AzureNative. https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apimanagementservice/ Does anyone know if it is possible? I have attached screenshots of how it looks in the Azure portal when adding the custom domain, and how the ARM template export looks. Specifically it's the "certificateSource" property that seems to be missing from HostNameConfigurationArgs.
e

echoing-dinner-19531

02/04/2022, 10:38 AM
You need to use the
v20210801
namespace.
import * as apimanagement from "@pulumi/azure-native/apimanagement/v20210801";
I think
s

shy-account-31313

02/04/2022, 10:47 AM
Thanks! I found the property using
AzureNative.ApiManagement.V20210101Preview
(C#) Will report back if it works out :)
🙌 1
It worked out great, using the exact version you mentioned @echoing-dinner-19531 Thanks again! C# example below for reference
Copy code
HostnameConfigurations = 
{
  new AzureNative.ApiManagement.V20210801.Inputs.HostnameConfigurationArgs
  {
    HostName = apiHostName,
    CertificateSource = "Managed",
    Type ="proxy"
  }
}
l

limited-carpenter-34991

07/21/2022, 12:06 PM
This configuration needs also dependend entries inside the dns, the txt record and the CNAME. Regarding the txt record it has to be an unique entry. Do you know how to generate this hash?
e

echoing-dinner-19531

07/21/2022, 12:08 PM
Do you mean the hash that Pulumi appends to names automatically?
l

limited-carpenter-34991

07/21/2022, 12:10 PM
No, an txt entry and a cname ist required for the hostname. And if you configure it manually the azure portal show the needed values for these two dns types.
And the hash which is needed, seems unique.
May be a combination of api management name and hostname
e

echoing-dinner-19531

07/21/2022, 12:12 PM
I do not know, I'd suggest asking in a new thread in #azure for visibility
l

limited-carpenter-34991

07/21/2022, 12:12 PM
Do you know what i mean?
#azure See attached screenshot.
4 Views