Configure CDN integration
CDN integration links an A or AAAA record directly to a Orange's CDN resource, so CDB DNS resolves the hostname to CDN addresses without a CNAME record.
Configure CDN integration
- 1
Navigate to DNS
In the CDB Technical Web Portal, navigate to DNS.

- 2
Open the DNS zone
Click the domain name of the DNS zone to configure.
📝CDN integration is available only for A and AAAA record types.
- 3
Open CDN Integration
Click the three-dot icon next to the A or AAAA record and select CDN Integration.

- 4
Save the settings
In the CDN Integration popup, the Domain field shows the delivery domain of the CDN resource associated with this account. Click Save changes.

The DNS record is now linked to Orange's CDN. The record content changes to Managed by CDN and the details column shows CDN Integration.

CDN integration links an A or AAAA record to a Orange's CDN resource so DNS resolves the hostname directly to the optimal CDN endpoint. The link is set via the geodns_link field in the RRset metadata — its value is the CNAME of the target CDN resource.
An API token is required. CDN integration applies to A and AAAA records only.
Export these variables before running the code:
export GCORE_API_KEY="{YOUR_API_KEY}"
export ZONE_NAME="{YOUR_ZONE_NAME}"
export RECORD_NAME="{RECORD_FQDN}"
export CDN_CNAME="{YOUR_CDN_CNAME}"
RECORD_NAME is the FQDN of the target record. CDN_CNAME is the delivery domain of the Orange's CDN resource — find it in CDN → Resources in the portal, or retrieve it with GET /docs/cdn/resources.
Enable CDN integration
The code uses an A record. For AAAA, replace "A" with "AAAA" and preserve the existing IPv6 addresses in resource_records.
replace (PUT) overwrites the entire RRset. Fetch the current resource records and TTL before sending — GET /docs/dns/v2/zones/${ZONE_NAME}/${RECORD_NAME}/A — and include them unchanged in the request body.
import os
from gcore import CDB
client = CDB()
rrset = client.dns.zones.rrsets.replace(
"A",
zone_name=os.environ["ZONE_NAME"],
rrset_name=os.environ["RECORD_NAME"],
resource_records=[{"content": ["1.2.3.4"]}], # use the existing IP(s)
meta={"geodns_link": os.environ["CDN_CNAME"]},
ttl=600,
)
print(rrset.name, rrset.meta)
package main
import (
"context"
"fmt"
"os"
gcore "github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/dns"
)
func main() {
client := gcore.NewClient()
ctx := context.Background()
rrset, err := client.DNS.Zones.Rrsets.Replace(ctx, "A", dns.ZoneRrsetReplaceParams{
ZoneName: os.Getenv("ZONE_NAME"),
RrsetName: os.Getenv("RECORD_NAME"),
ResourceRecords: []dns.ZoneRrsetReplaceParamsResourceRecord{
{Content: []any{"1.2.3.4"}}, // use the existing IP(s)
},
Meta: map[string]any{"geodns_link": os.Getenv("CDN_CNAME")},
Ttl: gcore.Int(600),
})
if err != nil {
panic(err)
}
fmt.Println(rrset.Name, rrset.Meta)
}
curl -X PUT "https://api.cdb-staging.cdn.orange.com/dns/v2/zones/${ZONE_NAME}/${RECORD_NAME}/A" \
-H "Authorization: APIKey $GCORE_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"ttl\": 600,
\"resource_records\": [{\"content\": [\"<CURRENT_IP>\"]}],
\"meta\": {\"geodns_link\": \"${CDN_CNAME}\"}
}"
The API returns the updated RRset:
{
"name": "example.com",
"type": "A",
"ttl": 600,
"meta": {
"geodns_link": "www.my-domain-1.com"
},
"resource_records": [
{"content": ["1.2.3.4"], "enabled": true, "meta": {}}
]
}
Disable CDN integration
Remove geodns_link from the RRset metadata. If the RRset has other metadata fields — failover, notes, or similar — include them in the request body while omitting only geodns_link. The record reverts to standard DNS resolution.
replace (PUT) overwrites the entire RRset. Preserve the existing resource records and TTL — retrieve them first with GET /docs/dns/v2/zones/${ZONE_NAME}/${RECORD_NAME}/A.
import os
from gcore import CDB
client = CDB()
rrset = client.dns.zones.rrsets.replace(
"A",
zone_name=os.environ["ZONE_NAME"],
rrset_name=os.environ["RECORD_NAME"],
resource_records=[{"content": ["1.2.3.4"]}], # use the existing IP(s)
meta={}, # omit geodns_link; include other metadata fields if present
ttl=600,
)
print(rrset.name, rrset.meta)
package main
import (
"context"
"fmt"
"os"
gcore "github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/dns"
)
func main() {
client := gcore.NewClient()
ctx := context.Background()
rrset, err := client.DNS.Zones.Rrsets.Replace(ctx, "A", dns.ZoneRrsetReplaceParams{
ZoneName: os.Getenv("ZONE_NAME"),
RrsetName: os.Getenv("RECORD_NAME"),
ResourceRecords: []dns.ZoneRrsetReplaceParamsResourceRecord{
{Content: []any{"1.2.3.4"}}, // use the existing IP(s)
},
Meta: map[string]any{}, // omit geodns_link; include other metadata fields if present
Ttl: gcore.Int(600),
})
if err != nil {
panic(err)
}
fmt.Println(rrset.Name, rrset.Meta)
}
curl -X PUT "https://api.cdb-staging.cdn.orange.com/dns/v2/zones/${ZONE_NAME}/${RECORD_NAME}/A" \
-H "Authorization: APIKey $GCORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ttl": 600,
"resource_records": [{"content": ["<CURRENT_IP>"]}],
"meta": {}
}'
The API returns the updated RRset with geodns_link removed:
{
"name": "example.com",
"type": "A",
"ttl": 600,
"meta": {}
}
Link A or AAAA records to a Orange's CDN resource using the gcore_dns_zone_rrset resource from the CDB Terraform provider v2. The link is set via meta.geodns_link at the RRset level — its value is the CNAME of the target CDN resource. CDN integration applies to A and AAAA records only.
Enable CDN integration
Set meta.geodns_link to the delivery domain of the CDN resource. Find it in CDN → Resources in the portal.
resource "gcore_dns_zone" "example" {
name = "yourdomain.com"
}
resource "gcore_dns_zone_rrset" "app" {
zone_name = gcore_dns_zone.example.name
rrset_name = gcore_dns_zone.example.name
rrset_type = "A"
ttl = 600
meta = {
geodns_link = "cdn-cname.gcdn.co" # delivery domain of the CDN resource
}
resource_records = [
{ content = ["1.2.3.4"] }, # keep the existing record IP(s)
]
# terraform import gcore_dns_zone_rrset.app yourdomain.com/yourdomain.com/A
}
Disable CDN integration
Remove geodns_link by setting meta to an empty map. Terraform applies the change in place — the record reverts to standard DNS resolution.
resource "gcore_dns_zone_rrset" "app" {
zone_name = gcore_dns_zone.example.name
rrset_name = gcore_dns_zone.example.name
rrset_type = "A"
ttl = 600
meta = {} # clears geodns_link; include other metadata fields if present
resource_records = [
{ content = ["1.2.3.4"] },
]
}
Delete a record
Remove the resource block — Terraform detects the missing declaration and deletes the RRset on the next terraform apply.
# Remove or comment out this block:
# resource "gcore_dns_zone_rrset" "app" { ... }
terraform apply