This message was deleted.
s
This message was deleted.
f
In the UI we have this:
When I do this manually via UI and choose APEX, the result here for
<http://elaway.fr|elaway.fr>
is an option to
Create an alias
record. However
<http://elaway.de|elaway.de>
, provisioned through pulumi using the aforementioned
AFDCustomDomain
results in option
Create CNAME record
which is not a thing for apex(/root) domains.
👍 1
Is this an API issue in pulumi?
I don't think this is going to be possible.
i
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. https://www.pulumi.com/registry/packages/command/
❤️ 1
m
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(
				apexPulumiName,
				new StaticSiteCustomDomainArgs
				{
					DomainName = dnsZoneName,
					ResourceGroupName = resourceGroupName,
					Name = swa.Name,
					ValidationMethod = "dns-txt-token"
				},
				new CustomResourceOptions
				{
					DependsOn = { apexAlias },
					IgnoreChanges = { "hostNameType", "validationMethod" },
				});
		}
🙌 1