Skip to content

Create CNAME record? #4391

Answered by StefanIvemo
jnus asked this question in Q&A
Sep 13, 2021 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

Here's an example on how to create a CNAME record using Bicep.

resource dnsZone 'Microsoft.Network/dnsZones@2018-05-01' existing = {
  name: 'mydomain.org'
}

resource cnameRecord 'Microsoft.Network/dnsZones/CNAME@2018-05-01' = {
  name: 'dnsRecordName'
  parent: dnsZone
  properties: {
    TTL: 3600
    CNAMERecord: {
      cname: 'targetname.targetdomain.com'
    }
  }
}

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@jnus
Comment options

@brwilkinson
Comment options

@jnus
Comment options

@brwilkinson
Comment options

@Gonkers
Comment options

Answer selected by jnus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants