{"id":21250781,"url":"https://github.com/langburd/terraform-cloudflare-dns-zone","last_synced_at":"2025-08-01T22:43:21.054Z","repository":{"id":261920305,"uuid":"880511121","full_name":"langburd/terraform-cloudflare-dns-zone","owner":"langburd","description":"Terraform module for managing CloudFlare DNS zones and their records from a YAML file","archived":false,"fork":false,"pushed_at":"2025-07-08T05:03:22.000Z","size":64,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T06:48:31.046Z","etag":null,"topics":["terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/langburd/dns-zone/cloudflare","language":"HCL","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/langburd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-10-29T21:23:47.000Z","updated_at":"2025-07-08T05:03:24.000Z","dependencies_parsed_at":"2024-11-09T09:23:33.507Z","dependency_job_id":"e060b0ee-be8e-4c11-893d-370347cf172f","html_url":"https://github.com/langburd/terraform-cloudflare-dns-zone","commit_stats":null,"previous_names":["langburd/terraform-cloudflare-dns-zone"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/langburd/terraform-cloudflare-dns-zone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fterraform-cloudflare-dns-zone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fterraform-cloudflare-dns-zone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fterraform-cloudflare-dns-zone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fterraform-cloudflare-dns-zone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langburd","download_url":"https://codeload.github.com/langburd/terraform-cloudflare-dns-zone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fterraform-cloudflare-dns-zone/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268308972,"owners_count":24230163,"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-08-01T02:00:08.611Z","response_time":67,"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":["terraform-module"],"created_at":"2024-11-21T03:38:51.654Z","updated_at":"2025-08-01T22:43:20.986Z","avatar_url":"https://github.com/langburd.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Cloudflare DNS Zone Module\n\nThis Terraform module manages Cloudflare DNS zones and records.\nIt provides functionality to both create new DNS zones and manage records within existing zones using one YAML file.\nThe module is published in both [Terraform](https://registry.terraform.io/modules/langburd/dns-zone/cloudflare) and [OpenTofu](https://search.opentofu.org/module/langburd/dns-zone/cloudflare) registries.\n\n## Features\n\n- Create new Cloudflare DNS zones\n- Manage existing Cloudflare DNS zones\n- Create and manage DNS records of various types\n- Supports multiple DNS records across different zones\n\n## Usage\n\n```terraform\nmodule \"cloudflare_dns\" {\n  source  = \"langburd/dns-zone/cloudflare\"\n  version = \"~\u003e 1.0\"\n\n  # Path to your YAML configuration file\n  zones_file = \"./zones.yaml\"\n}\n```\n\nExample of `zones.yaml` (filename could be arbitrary):\n\n```yaml\n---\n# zones.yaml\ndns_zones:\n  - name: some-example-domain.com\n    create: true\n    default_ttl: 3600\n    records:\n      A:\n        - name: '@'\n          content: 5.6.7.8\n        - name: ftp\n          comment: 'FTP server'\n          content: 1.2.3.4\n          ttl: 600\n      CNAME:\n        - name: www\n          content: some-example-domain.com\n          proxied: true\n          ttl: 1\n        - name: mail\n          content: ghs.googlehosted.com\n      MX:\n        - name: '@'\n          content: aspmx.l.google.com\n          priority: 10\n        - name: '@'\n          content: alt1.aspmx.l.google.com\n          priority: 20\n      TXT:\n        - name: '@'\n          comment: 'Google site verification'\n          content: v=spf1 include:_spf.google.com ~all\n        - name: '@'\n          comment: 'Azure domain verification'\n          content: MS=ms18454532\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.2.0 |\n| \u003ca name=\"requirement_cloudflare\"\u003e\u003c/a\u003e [cloudflare](#requirement\\_cloudflare) | \u003e= 4.0, \u003c 5.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_cloudflare\"\u003e\u003c/a\u003e [cloudflare](#provider\\_cloudflare) | \u003e= 4.0, \u003c 5.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [cloudflare_record.dns_records](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/record) | resource |\n| [cloudflare_zone.created_zones](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zone) | resource |\n| [cloudflare_accounts.current](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/data-sources/accounts) | data source |\n| [cloudflare_zone.existing_zones](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/data-sources/zone) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_zones_file\"\u003e\u003c/a\u003e [zones\\_file](#input\\_zones\\_file) | Path to the YAML file containing DNS zones and records. | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_created_zones\"\u003e\u003c/a\u003e [created\\_zones](#output\\_created\\_zones) | Cloudflare DNS zones. |\n| \u003ca name=\"output_dns_records\"\u003e\u003c/a\u003e [dns\\_records](#output\\_dns\\_records) | Cloudflare DNS records. |\n| \u003ca name=\"output_existing_zones\"\u003e\u003c/a\u003e [existing\\_zones](#output\\_existing\\_zones) | Cloudflare DNS zones. |\n\u003c!-- END_TF_DOCS --\u003e\n\n## Notes\n\n- The module automatically handles TXT record content formatting by adding required quotes\n- Zone IDs are automatically looked up and managed internally\n- Record names are automatically formatted to ensure uniqueness\n\n## Contributing\n\nContributions are welcome! This project uses pre-commit hooks to ensure code quality. Please make sure to install and run pre-commit before submitting any changes.\n\n## License\n\n\u003ca href=\"https://opensource.org/license/mit\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge\" alt=\"MIT License\"\u003e\u003c/a\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMIT License\u003c/summary\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nComplete license is available in the [`LICENSE`](LICENSE) file.\n\n```text\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n\u003c/details\u003e\n\n## Trademarks\n\nAll other trademarks referenced herein are the property of their respective owners.\n\n## Copyrights\n\nCopyright © 2024-2025 [Avi Langburd](https://github.com/langburd)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangburd%2Fterraform-cloudflare-dns-zone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangburd%2Fterraform-cloudflare-dns-zone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangburd%2Fterraform-cloudflare-dns-zone/lists"}