exec.azurerm.dns.record_set

Azure Resource Manager (ARM) DNS Record Set Execution Module

New in version 1.0.0.

maintainer:

<devops@eitr.tech>

configuration:

This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function or via acct in order to work properly.

Required provider parameters:

if using username and password:
  • subscription_id
  • username
  • password
if using a service principal:
  • subscription_id
  • tenant
  • client_id
  • secret

Optional provider parameters:

cloud_environment: Used to point the cloud driver to different API endpoints, such as Azure GovCloud. Possible values:

  • AZURE_PUBLIC_CLOUD (default)
  • AZURE_CHINA_CLOUD
  • AZURE_US_GOV_CLOUD
  • AZURE_GERMAN_CLOUD
idem_azurerm.exec.azurerm.dns.record_set.create_or_update(hub, ctx, name, zone_name, resource_group, record_type, **kwargs)

New in version 1.0.0.

Creates or updates a record set within a DNS zone.

Parameters:
  • name – The name of the record set, relative to the name of the zone.
  • zone_name – The name of the DNS zone (without a terminating dot).
  • resource_group – The name of the resource group.
  • record_type – The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created). Possible values include: ‘A’, ‘AAAA’, ‘CAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’

CLI Example:

azurerm.dns.record_set.create_or_update myhost myzone testgroup A arecords='[{ipv4_address: 10.0.0.1}]' ttl=300
idem_azurerm.exec.azurerm.dns.record_set.delete(hub, ctx, name, zone_name, resource_group, record_type, **kwargs)

New in version 1.0.0.

Deletes a record set from a DNS zone. This operation cannot be undone.

Parameters:
  • name – The name of the record set, relative to the name of the zone.
  • zone_name – The name of the DNS zone (without a terminating dot).
  • resource_group – The name of the resource group.
  • record_type – The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). Possible values include: ‘A’, ‘AAAA’, ‘CAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’

CLI Example:

azurerm.dns.record_set.delete myhost myzone testgroup A
idem_azurerm.exec.azurerm.dns.record_set.get(hub, ctx, name, zone_name, resource_group, record_type, **kwargs)

New in version 1.0.0.

Get a dictionary representing a record set’s properties.

Parameters:
  • name – The name of the record set, relative to the name of the zone.
  • zone_name – The name of the DNS zone (without a terminating dot).
  • resource_group – The name of the resource group.
  • record_type – The type of DNS record in this record set. Possible values include: ‘A’, ‘AAAA’, ‘CAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’

CLI Example:

azurerm.dns.record_set.get '@' myzone testgroup SOA
idem_azurerm.exec.azurerm.dns.record_set.list_by_dns_zone(hub, ctx, zone_name, resource_group, top=None, recordsetnamesuffix=None, **kwargs)

New in version 1.0.0.

Lists all record sets in a DNS zone.

Parameters:
  • zone_name – The name of the DNS zone (without a terminating dot).
  • resource_group – The name of the resource group.
  • top – The maximum number of record sets to return. If not specified, returns up to 100 record sets.
  • recordsetnamesuffix – The suffix label of the record set name that has to be used to filter the record set enumerations.

CLI Example:

azurerm.dns.record_set.list_by_dns_zone myzone testgroup
idem_azurerm.exec.azurerm.dns.record_set.list_by_type(hub, ctx, zone_name, resource_group, record_type, top=None, recordsetnamesuffix=None, **kwargs)

New in version 1.0.0.

Lists the record sets of a specified type in a DNS zone.

Parameters:
  • zone_name – The name of the DNS zone (without a terminating dot).
  • resource_group – The name of the resource group.
  • record_type – The type of record sets to enumerate. Possible values include: ‘A’, ‘AAAA’, ‘CAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’
  • top – The maximum number of record sets to return. If not specified, returns up to 100 record sets.
  • recordsetnamesuffix – The suffix label of the record set name that has to be used to filter the record set enumerations.

CLI Example:

azurerm.dns.record_set.list_by_type myzone testgroup SOA