Cloudflare Import Scope
Cloudflare Import reads selected active zones and prepares an editable draft from A, AAAA and CNAME DNS records. The draft can contain Services, host-based Routes and Load Balancers with Targets.
Nothing is applied while the draft is being prepared. You can exclude individual records before starting the apply operation.
Before You Begin the Import
- Sign in with an administrator account; the module is restricted to administrators.
- Create a Cloudflare API token with Zone Read and DNS Read access for the intended zones.
- Review the DNS records and confirm that their A, AAAA or CNAME targets represent the actual origin endpoints.
- Plan a maintenance window when the imported Routes could overlap with existing traffic rules.
The Cloudflare API token is used for the current import session and is not stored on the computer by the import screen.
Connect and Fetch Zones
- Open Cloudflare Import and enter the API token.
- Select Connect. Apiruler lists the active zones visible to the token and initially selects them.
- Clear any zone that must not be included.
- Select Fetch to read A, AAAA and CNAME records for the selected zones.
- Review per-zone counts and any module-level fetch errors before continuing.
DNS-to-Configuration Mapping
| DNS result | Generated configuration | Default behavior |
|---|---|---|
| One A or AAAA address | One Service and one host Route | HTTPS target on port 443. |
| Multiple A or AAAA addresses | One Load Balancer, one Target per address, one Service and one host Route | Round Robin with Target weight 100. |
| One CNAME target | One Service and one host Route | The first CNAME is used as the Service host. |
| No usable origin | Service draft with a warning | Placeholder origin requires correction before traffic is allowed. |
| Saved endpoint operation | Additional method-and-path Route when available | Path parameters are converted to regular-expression segments. |
DNS content is treated as the origin candidate even for proxied records. Confirm every generated Service host and Target before applying the draft.
Review and Apply the Draft
- Review the summary counts for Services, Routes, Load Balancers and warnings.
- Inspect each generated name, hostname, origin, path and method.
- Disable Included for every item that should not be created.
- Resolve placeholder origins and unexpected CNAME or multi-address mappings before application.
- Select Apply. The platform creates Load Balancers and Targets first, then Services, then Routes.
- Keep the page open until the apply phase reports completion.
If a Service, Route or Load Balancer with the generated name already exists, the importer skips that record instead of overwriting it.
Validate Import Results
- Review the Created Services, Created Routes, Created Load Balancers, Skipped and Failed counts.
- Read every failure entry and record the entity type, name and error message.
- Open Services and confirm the generated host, port, protocol and enabled status.
- Open Routes and confirm the host, path and method matching values.
- Open Load Balancers and verify every generated Target when a hostname had multiple addresses.
- Send controlled test requests only after placeholder origins and warnings have been resolved.
Cloudflare Import Troubleshooting
| Problem | Likely cause | What to do |
|---|---|---|
| No active zones are listed. | The token cannot read zones or no active zone is available. | Check token scope, account access and zone status. |
| No DNS records are found. | The selected zones contain no A, AAAA or CNAME records visible to the token. | Review Cloudflare DNS and token permissions, then fetch again. |
| A Service contains a placeholder origin. | No usable origin address was found for the hostname. | Replace the placeholder with the verified backend before sending traffic. |
| Records are skipped. | An entity with the generated name already exists. | Inspect the existing record and decide whether to keep it or import under a different name. |
| A Route fails after its Service fails. | The parent Service was not created and no existing ID could be resolved. | Correct the Service error first, then create or retry the Route. |
| Only part of the draft is created. | Individual records failed while later independent records continued. | Use the failure list to repair each record and verify all created dependencies. |