gcloud dns record-sets import - import record-sets into your managed-zone
gcloud dns record-sets import RECORDS_FILE --zone ZONE, -z ZONE [--delete-all-existing] [--replace-origin-ns] [--zone-file-format] [GLOBAL-FLAG ...]
This command imports record-sets contained within the specified record-sets file into your managed-zone. Note that NS records for the origin of the zone, and the SOA NS field, are not imported since name-servers are managed by Cloud DNS. By default, record-sets cannot be imported if there are any conflicts. A conflict exists if an existing record-set has the same name and type as a record-set that is being imported. In contrast, if the --delete-all-existing flag is used, the imported record-sets will replace all the records-sets currently in the managed-zone.
RECORDS_FILEFile from which record-sets should be imported.
--zone ZONE, -z ZONEName of the managed-zone whose record-sets you want to manage.
--delete-all-existingIndicates that all existing record-sets should be deleted before importing the record-sets in the records-file.--replace-origin-ns
Indicates that NS records for the origin of a zone should be imported if defined--zone-file-format
Indicates that the records-file is in the zone file format.
Run $ gcloud help for a description of flags available to all commands.
To import record-sets from a yaml record-sets file, run:
$ gcloud dns record-sets import YAML_RECORDS_FILE -z MANAGED_ZONE
To import record-sets from a zone file, run:
$ gcloud dns record-sets import ZONE_FILE --zone-file-format \
To replace all the record-sets in your zone with records from a yaml file, run:
$ gcloud dns record-sets import YAML_RECORDS_FILE \
--delete-all-existing -z MANAGED_ZONE