Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly set
multi_script
on Enterprise worker imports (#124)
This updates the import for `cloudflare_worker_route` resource. Prior to this it relied on `d.Get("script_name")` which was never accessible so it would always return an empty string (even when using `getRouteFromResource`). With this change, it now queries the Cloudflare API fetching all worker routes and when the route ID matches one in the API response, it will set the `isEnterpriseWorker` flag to `true` which will correctly set the `multi_script` option. This includes the prerequisitie that the organisation ID must also be set to enable it which maintains compatibility with the existing behaviour. Fixes #123
- Loading branch information