simon / Terraform

Last active 1 month ago

terraform.md Raw

terraform

importing cloudflare records

  • get record ID from Cloudflare API:
curl https://api.cloudflare.com/client/v4/zones/<zone_id>/dns_records?per_page=50&page=1 \
    -H "X-Auth-Key:<api_key>" \
    -H "X-Auth-Email:<account_email>" \
    -H "Content-Type:application/json" \
    | jq .
  • create the resource declaration in the terraform manifest.
  • import the resource:

terraform import cloudflare_record.<resource_name> <zone_id>/<record_id>

  • import resources created with for_each:
terraform import github_issue_label.issue_label[\"skip-verify-changelog\"] terraform-module-proxmox-container:skip-verify-changelog