Using Azure native to setup a custom domain for CD...
# azure
Using Azure native to setup a custom domain for CDN/FrontDoor, specifically `v20220501preview`: , I can't seem find a way to specify that the domain is an APEX domain.
In the UI we have this:
When I do this manually via UI and choose APEX, the result here for
is an option to
Create an alias
record. However
, provisioned through pulumi using the aforementioned
results in option
Create CNAME record
which is not a thing for apex(/root) domains.
Is this an API issue in pulumi?
I don't think this is going to be possible.
I've found some situations where you cannot do everything via ARM templates or Pulumi but only via CLI. Then I invoke the script using a pulumi command.
Some code for SWA Apex Domain. Not sure if it will translate for CDN/FrontDoor.
Copy code
if (apexDomain)
			var apexAlias = new RecordSet($"{name}-apex-dns", new RecordSetArgs
				RecordType = "A",
				RelativeRecordSetName = "@",
				ResourceGroupName = dnsZoneResourceGroupName,
				TargetResource = new SubResourceArgs {
					Id = swa.Id
				Ttl = 60,
				ZoneName = dnsZoneName

			var apexPulumiName = $"{name}-apex-domain";
			var apexDomainItem = new StaticSiteCustomDomain(
				new StaticSiteCustomDomainArgs
					DomainName = dnsZoneName,
					ResourceGroupName = resourceGroupName,
					Name = swa.Name,
					ValidationMethod = "dns-txt-token"
				new CustomResourceOptions
					DependsOn = { apexAlias },
					IgnoreChanges = { "hostNameType", "validationMethod" },