Anyone got any clue how i can migrate from the old...
# general
s
Anyone got any clue how i can migrate from the old
Copy code
using Pulumi.Azure.Cdn;
using Pulumi.Azure.Cdn.Inputs;
to AzureNative? 😄 Is there something available? Its mostly this cmponent doing problems:
Copy code
EndpointCustomDomain endpointCustomDomain = new(options.AppName, new()
        {
            // This is needed to avoid updating the CustomDomain on each run, because the CdnEndpointId in the Pulumi state uses "resourceGroups"
            CdnEndpointId = cdnEndpoint.Id.Apply(x => x.Replace("resourcegroups", "resourceGroups")),
            HostName = hostName,
            CdnManagedHttps = new EndpointCustomDomainCdnManagedHttpsArgs
            {
                CertificateType = "Dedicated",
                ProtocolType = "ServerNameIndication",
                TlsVersion = "TLS12"
            }
        });
I cant seem to find anything similar on my
Copy code
using Pulumi.AzureNative.Cdn;
using Pulumi.AzureNative.Cdn.Inputs;
Its mostly the managedHttps i cant get to work and the general EndpointCustomDomain not being there, which we are using to make custom endpoints for our frontend
l
@straight-whale-42634 would this resource be the one you are searching for in Azure Native? https://www.pulumi.com/registry/packages/azure-native/api-docs/cdn/endpoint/
s
Is there nothing regarding Http on this, as I managed CdnManagedHttps before?
l
@straight-whale-42634 not on the
Endpoint
resource, but you have a
CustomDomain
resource containing some outputs referring to this: https://www.pulumi.com/registry/packages/azure-native/api-docs/cdn/customdomain/
s
Hey @limited-rainbow-51650 🙂 I am not able to tranfer:
Copy code
EndpointCustomDomain endpointCustomDomain = new(options.AppName, new()
        {
            // This is needed to avoid updating the CustomDomain on each run, because the CdnEndpointId in the Pulumi state uses "resourceGroups"
            CdnEndpointId = cdnEndpoint.Id.Apply(x => x.Replace("resourcegroups", "resourceGroups")),
            HostName = hostName,
            CdnManagedHttps = new EndpointCustomDomainCdnManagedHttpsArgs
            {
                CertificateType = "Dedicated",
                ProtocolType = "ServerNameIndication",
                TlsVersion = "TLS12"
            }
        });
into
Copy code
var customDomain = new AzureNative.Cdn.CustomDomain("customDomain", new()
{
    CustomDomainName = "www-someDomain-net",
    EndpointName = "endpoint1",
    HostName = "<http://www.someDomain.net|www.someDomain.net>",
    ProfileName = "profile1",
    ResourceGroupName = "RG",
});
because i feel like im missing certificate type etc missing?
@limited-rainbow-51650 @brave-planet-10645 Anything you could assist me with here? 🙂 Im a bit in doubt if im confused or there is just no way of doing CdnManagedHttps with AzureNative
m
Turns it’s due to this open issue: https://github.com/pulumi/pulumi-azure-native/issues/1443 The native provider’s
cdn.Endpoint
resource is the correct resource to use here. However, the SSL part is not modeled as part of the resource in the Azure spec, but as a separate POST request. We’d need a custom implementation here. Please upvote the issue if you’re interested.
s
Nice find. I upvoted it 🙂