Hi there! I have set up an Azure Api Management se...
# general
s
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
You need to use the
v20210801
namespace.
import * as apimanagement from "@pulumi/azure-native/apimanagement/v20210801";
I think
s
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
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
Do you mean the hash that Pulumi appends to names automatically?
l
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
I do not know, I'd suggest asking in a new thread in #azure for visibility
l
Do you know what i mean?
#azure See attached screenshot.