Secondary Zone

dns_secondary_zone

This is a module that supports creating, updating or destroying DNS Secondary Zones

Example Syntax


name: Create Secondary Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  name: 'test.example.test.ansible.com'
  description: 'test_description'
  primary_ips: ''
register: zone_response


name: Update Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  secondary_zone: ''
  description: 'zone_description_updated'
  primary_ips: ''
  allow_replace: false
  state: update
register: updated_zone_response


name: Transfer Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  secondary_zone: ''
  wait: false
  state: transfer


name: Delete Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  secondary_zone: ''
  wait: true
  state: absent

Returned object

{
    "changed": false,
    "failed": false,
    "action": "create",
    "secondary_zone": {
        "id": "bb1a4664-0f79-57e2-85ff-36c22b164884",
        "type": "secondaryzone",
        "href": "/secondaryzones/bb1a4664-0f79-57e2-85ff-36c22b164884",
        "metadata": {
            "last_modified_date": "2023-10-25T14:26:17+00:00",
            "created_date": "2023-10-25T14:26:17+00:00",
            "state": "AVAILABLE",
            "nameservers": [
                "<NAMESERVER1>",
                "<NAMESERVER2>",
                "<NAMESERVER3>",
                "<NAMESERVER4>"
            ]
        },
        "properties": {
            "zone_name": "<ZONE_NAME>",
            "description": "test_description",
            "primary_ips": [
                "<IP1>",
                "<IP2>"
            ]
        }
    }
}

For more examples please check out the tests here.

state: present

  
name: Create Secondary Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  name: 'test.example.test.ansible.com'
  description: 'test_description'
  primary_ips: ''
register: zone_response

Available parameters for state present:

NameRequiredDescription

name str

True

The zone name

description str

False

The hosted zone is used for...

primary_ips list

False

Indicates IP addresses of primary nameservers for a secondary zone. Accepts IPv4 and IPv6 addresses

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update', 'transfer']

state: absent

  
name: Delete Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  secondary_zone: ''
  wait: true
  state: absent

Available parameters for state absent:

NameRequiredDescription

secondary_zone str

True

The ID or name of an existing Secondary Zone.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update', 'transfer']

state: update

  
name: Update Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  secondary_zone: ''
  description: 'zone_description_updated'
  primary_ips: ''
  allow_replace: false
  state: update
register: updated_zone_response

Available parameters for state update:

NameRequiredDescription

name str

False

The zone name

description str

False

The hosted zone is used for...

primary_ips list

False

Indicates IP addresses of primary nameservers for a secondary zone. Accepts IPv4 and IPv6 addresses

secondary_zone str

True

The ID or name of an existing Secondary Zone.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update', 'transfer']

state: transfer

  
name: Transfer Zone
ionoscloudsdk.ionoscloud.dns_secondary_zone:
  secondary_zone: ''
  wait: false
  state: transfer

Available parameters for state transfer:

NameRequiredDescription

secondary_zone str

True

The ID or name of an existing Secondary Zone.

api_url str

False

The Ionos API base URL.

certificate_fingerprint str

False

The Ionos API certificate fingerprint.

username str

False

The Ionos username. Overrides the IONOS_USERNAME environment variable.

password str

False

The Ionos password. Overrides the IONOS_PASSWORD environment variable.

token str

False

The Ionos token. Overrides the IONOS_TOKEN environment variable.

wait bool

False

Wait for the resource to be created before returning. Default: True Options: [True, False]

wait_timeout int

False

How long before wait gives up, in seconds. Default: 600

state str

False

Indicate desired state of the resource. Default: present Options: ['present', 'absent', 'update', 'transfer']

Last updated