Created
June 24, 2021 15:21
-
-
Save mvasilenko/5448a9f7b86bbf7bfe4d784a4ff42544 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for importing cloudflare hosted dns zones into terraform | |
# list zones | |
curl -s -X GET "https://api.cloudflare.com/client/v4/zones/?per_page=100" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json"| jq -r '.result[] | "\(.id) \(.name)"' | |
# list records at the zone 1234567890 | |
curl -X GET "https://api.cloudflare.com/client/v4/zones/1234567890/dns_records?per_page=100" -H "X-Auth-Email: $auth_email" -H "X-Auth-Key: $auth_key" -H "Content-Type: application/json"| jq -r '.result[] | "\(.id) \(.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment