Overview
Creates or updates a TXT (Text) record set in an Azure DNS zone.
TXT records are commonly used for domain verification, SPF records, DKIM, and other text-based configurations.
|
|
| Name |
txt |
| Tag |
2026.8.25.2 |
| FullName |
br:bicepacrdevwcom.azurecr.io/bicep/modules/dns/zones/txt:2026.8.25.2 |
| Last updated |
2026-08-25 09:44:02:+00:00 |
| Created |
2026-08-25 09:44:02:+00:00 |
| Digest |
sha256:8cde73ccbb6e41489b6150243a0def94aaac134700ac241068a61cd447a7ee37 |
Parameters
| Name |
Type |
Required |
Description |
dnsZoneName |
string |
Yes |
The name of the existing DNS zone where the TXT record will be created. |
txtRecordName |
string |
Yes |
The name of the TXT record set to create or update (e.g., "example" for example.domain.com or "@" for the root of the domain). |
txtRecords |
array |
Yes |
An array of text strings to include in the TXT record set (e.g., ["v=spf1 include:spf.protection.outlook.com ~all"]). |
ttl |
int |
No
300 |
The time-to-live (TTL) value for the TXT record set, in seconds. Defaults to 300 seconds (5 minutes). |
Outputs
Example
@description('The target environment.')
param env string
@description('The deployment version.')
param version string = '1.0.0.0'
@description('The name of the existing DNS zone where the TXT record will be created.')
param dnsZoneName string
@description('The name of the TXT record set to create or update (e.g., "example" for example.domain.com or "@" for the root of the domain).')
param txtRecordName string
@description('An array of text strings to include in the TXT record set (e.g., ["v=spf1 include:spf.protection.outlook.com ~all"]).')
param txtRecords array
module txt 'br:bicepacrdevwcom.azurecr.io/bicep/modules/dns/zones/txt:2026.8.25.2' = {
name: 'txt${env}${version}'
params: {
dnsZoneName: dnsZoneName
txtRecordName: txtRecordName
txtRecords: txtRecords
}
}