Skip to content

Commit

Permalink
Set record for website cname
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerAL committed Sep 22, 2024
1 parent 37b2789 commit 055e949
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,26 @@ private DomainsInfrastructure GenerateDomainEntries(CloudflarePagesApp webClient
Provider = provider
});

//var record = new Cloudflare.Record("website-cname", new Cloudflare.RecordArgs
//{
// Name = GlobalConfig.WebClientInfraConfig.RootDomain,
// Content = webClientInfra.PagesProject.Subdomain,
// ZoneId = GlobalConfig.WebClientInfraConfig.CloudflareZoneId,
// Proxied = true,
// AllowOverwrite = true,
// Type = "CNAME",
// Ttl = 1,//Has to be set to 1 because this is proxied
//}, new CustomResourceOptions
//{
// Provider = provider,
// //Need to register the Pages Domain before making the CNAME record, otherwise it will fail
// DependsOn = new[] { pagesDomain }
//});

var record = new Cloudflare.Record("website-cname", new Cloudflare.RecordArgs
{
Name = GlobalConfig.WebClientInfraConfig.RootDomain,
Content = webClientInfra.PagesProject.Subdomain,
Name = "svghelpers",
Content = webClientInfra.PagesProject.Domains.Apply(x => x.First()),
ZoneId = GlobalConfig.WebClientInfraConfig.CloudflareZoneId,
Proxied = true,
AllowOverwrite = true,
Expand Down

0 comments on commit 055e949

Please sign in to comment.