{"id":21482621,"url":"https://github.com/jetrails/drone-cloudflare-dns","last_synced_at":"2025-07-24T10:02:33.663Z","repository":{"id":91417447,"uuid":"198858975","full_name":"jetrails/drone-cloudflare-dns","owner":"jetrails","description":"Drone plugin to control simple DNS records via Cloudflare's API","archived":false,"fork":false,"pushed_at":"2025-07-10T15:24:10.000Z","size":16,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T04:49:09.041Z","etag":null,"topics":["cloudflare-api","cloudflare-dns","drone","drone-plugin"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/jetrails/drone-cloudflare-dns","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jetrails.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-25T15:40:28.000Z","updated_at":"2025-07-10T15:24:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f70a8ba-94e3-44be-a856-280f9baa3a38","html_url":"https://github.com/jetrails/drone-cloudflare-dns","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jetrails/drone-cloudflare-dns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrails%2Fdrone-cloudflare-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrails%2Fdrone-cloudflare-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrails%2Fdrone-cloudflare-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrails%2Fdrone-cloudflare-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jetrails","download_url":"https://codeload.github.com/jetrails/drone-cloudflare-dns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrails%2Fdrone-cloudflare-dns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266822876,"owners_count":23989886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-api","cloudflare-dns","drone","drone-plugin"],"created_at":"2024-11-23T12:34:50.141Z","updated_at":"2025-07-24T10:02:33.619Z","avatar_url":"https://github.com/jetrails.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drone — Cloudflare DNS\n\u003e Drone plugin to control simple DNS records via Cloudflare's API\n\n![](https://img.shields.io/badge/License-MIT-lightgray.svg?style=for-the-badge)\n![](https://img.shields.io/docker/stars/jetrails/drone-cloudflare-dns.svg?style=for-the-badge\u0026colorB=9f9f9f)\n![](https://img.shields.io/docker/pulls/jetrails/drone-cloudflare-dns.svg?style=for-the-badge\u0026colorB=9f9f9f)\n\n## About\n\nOur Drone plugin enables the ability for your pipeline to interface with Cloudflare's API to create/update/delete DNS records. This plugin is written in Go and it uses the [cloudflare-go](https://github.com/cloudflare/cloudflare-go) package to communicate with Cloudflare's API. For information on Cloudflare's API please refer to their [documentation](https://api.cloudflare.com/#dns-records-for-a-zone-properties) page.\n\n## Cloudflare Token\n\nThe API token that is used to authenticate with Cloudflare's API can be created in Cloudflare's dashboard. It is recommended to create an API token that includes only the zone resource you want to manipulate and give edit permissions only to the DNS resource.\n\n## Build\n\nDevelop locally by running the plugin with the following commands. Also please note that you should specify environmental variables for the plugin either via the inline method (`FOO=bar go run src/main`) or via the `export FOO=bar` method before the `go run` command.\n\n```shell\n$ go mod download\n$ go run cmd/main/main.go\n```\n\n## Docker\n\nDrone plugins work off of docker images. The following commands will go over building, pushing, and running the docker image for this plugin.\n\n###### Build Docker Image:\n\n```shell\n$ docker build -t jetrails/drone-cloudflare-dns .\n```\n\n###### Run Docker Container:\n\nYou can then replicate the command that Drone will use to launch the plugin by running:\n\n```shell\n$ docker run --rm \\\n\t-e PLUGIN_API_TOKEN=\"u4C7ev06GMS8_vWBTpjqtVReT3I7FwGpW7MG44ZD\" \\\n\t-e PLUGIN_ZONE_IDENTIFIER=\"eJzrjE44s6Ki67x1tSDJzI8LdXxM3nj7\" \\\n\t-e PLUGIN_ACTION=\"set\" \\\n\t-e PLUGIN_RECORD_TYPE=\"cname\" \\\n\t-e PLUGIN_RECORD_NAME=\"example.com\" \\\n\t-e PLUGIN_RECORD_CONTENT=\"google.com\" \\\n\t-e PLUGIN_RECORD_PROXIED=\"true\" \\\n\t-e PLUGIN_RECORD_TTL=\"3600\" \\\n\t-v $(pwd):/drone/src \\\n\t-w /drone/src \\\n\tjetrails/drone-cloudflare-dns\n```\n\n###### Push Docker Image:\n\nFinally, push this image to our Docker Hub [repository](https://hub.docker.com/r/jetrails/drone-cloudflare-dns) (assuming you have permission):\n\n```shell\n$ docker push jetrails/drone-cloudflare-dns\n```\n\n## Usage\n\nThere are two values for `action`, set and unset. If set is choosen and a record does not already exist, then the record is created. If set is choosen and the record already exists, then the record is updated. It is recommended that the `record_name` value be always set to the FQDN. Please refer to the table below with all possible settings that can be passed to the plugin:\n\n|       Name      |    Required   | Default | Case-Sensitive |        Type       |\n|:---------------:|:-------------:|:-------:|:--------------:|:-----------------:|\n|    api_token    |      Yes      |    -    |       Yes      |       STRING      |\n| zone_identifier |      Yes      |    -    |       Yes      |       STRING      |\n|      action     |      Yes      |    -    |       No       |  ENUM[set,unset]  |\n|   record_type   |      Yes      |    -    |       No       | ENUM[a,cname,...] |\n|   record_name   |      Yes      |    -    |       Yes      |       STRING      |\n|  record_content | action == set |    -    |       Yes      |       STRING      |\n|  record_proxied |       No      |   true  |       N/A      |       STRING      |\n|    record_ttl   |       No      |    1    |       N/A      |        INT        |\n| record_priority |       No      |    1    |       N/A      |        INT        |\n|      debug      |       No      |  false  |       N/A      |       STRING      |\n\n## Examples\n\n```yaml\nkind: pipeline\nname: default\n\nsteps:\n-   name: cloudflare\n    image: jetrails/drone-cloudflare-dns\n    settings:\n        api_token:\n            from_secret: cloudflare_token\n        zone_identifier:\n            from_secret: cloudflare_zone_identifier\n        action: set\n        record_type: a\n        record_name: example.com\n        record_content: 127.0.0.1\n        record_proxied: false\n```\n\n```yaml\nkind: pipeline\nname: default\n\nsteps:\n-   name: cloudflare\n    image: jetrails/drone-cloudflare-dns\n    settings:\n        api_token:\n            from_secret: cloudflare_token\n        zone_identifier:\n            from_secret: cloudflare_zone_identifier\n        action: unset\n        record_type: a\n        record_name: example.com\n```\n\n## Feature Requests / Issues\n\nFeel free to open an issue for any feature requests and issues that you may come across. For furthur inquery, please contact [development@jetrails.com](mailto://development@jetrails.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetrails%2Fdrone-cloudflare-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetrails%2Fdrone-cloudflare-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetrails%2Fdrone-cloudflare-dns/lists"}