Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kazanexpress/dns-gcp-2-yc

Script for migrating DNS zone from Google Cloud Platform to Yandex Cloud.
https://github.com/kazanexpress/dns-gcp-2-yc

dns gcp google-cloud yandex-cloud

Last synced: 28 days ago
JSON representation

Script for migrating DNS zone from Google Cloud Platform to Yandex Cloud.

Awesome Lists containing this project

README

        

# dns-gcp-2-yc

Script for migrating DNS zone from Google Cloud Platform to Yandex Cloud.

## Warning

Take a notice that for yandex DNS record names `@.domain.com` and `domain.com` are the same. Merge them to single dns record in google before running scripts.

## How to use

```bash
# export all zones from GCP to dns folder
mkdir ./dns
gcloud dns managed-zones list | awk '{print $1}' | grep -v NAME | xargs -n 1 -I% gcloud dns record-sets export ./dns/% --zone=%

mkdir ./tf
# generate terraform files
go run main.go --dns-dir=./dns --tf-dir=./tf --skip-types=ns,soa

# copy template file and edit if needed
cp main.tf ./tf
cd ./tf

terraform init
terraform plan
terraform apply

```