Page cover

record-create

The dns record-create command adds a new DNS record to a specific DNS zone.This command requires the DNS zone ID and record details, including record type, name, content, and TTL.

Usage

cldkctl dns record-create [id] [flags]

Steps

Follow the steps below to run and view the result of this command:

  1. Run the following command in your terminal:

cldkctl dns record-create [dns-zone-id] --type [record-type] --name [record-name] --content [record-content] --ttl [record-ttl]
  1. Replace [dns-zone-id] with the ID of the DNS zone. Refer to dns list section to obtain the DNS zone ID.

  2. Replace [record-type] with the DNS record type.

  3. Replace [record-name] with the record name.

  4. Replace [record-content] with the record value.

  5. Replace [record-ttl] with the desired TTL (time to live) value.

  6. Or alternatively, run the command without flags to create a DNS record interactively using TUI mode:

cldkctl dns record-create [dns-zone-id]
  1. Select the DNS record type from the list.

  2. Enter the record name when prompted.

  1. Enter the record content when prompted.

  2. Enter the TTL value or press Enter to use the default value (86400).

  1. Confirm the record creation by pressing y for Confirm or n for Cancel.

  1. Once completed successfully, a message “✓ DNS record created successfully!” will appear in the terminal.

Flags

This command supports global flags. Refer to the Global Flags section for details.

Flag
Description

-c, --content string

DNS record content.

-h, --help

Help for dns record create command.

-n, --name string

DNS record name.

--ttl int

DNS record TTL (time to live) (default 86400).

-t, --type string

DNS record type.

Last updated