https://github.com/kolosovpetro/cloudflaremanagementpowershell
PowerShell solution for managing Cloudflare DNS records: fetch Zone ID, retrieve all DNS records, create new records, update existing ones, delete records, or create/update. Includes SYNOPSIS documentation for better user experience. Tested on ubuntu-latest and windows-latest agents using GitHub Actions and Azure Pipelines.
https://github.com/kolosovpetro/cloudflaremanagementpowershell
powershell powershell-script
Last synced: 3 months ago
JSON representation
PowerShell solution for managing Cloudflare DNS records: fetch Zone ID, retrieve all DNS records, create new records, update existing ones, delete records, or create/update. Includes SYNOPSIS documentation for better user experience. Tested on ubuntu-latest and windows-latest agents using GitHub Actions and Azure Pipelines.
- Host: GitHub
- URL: https://github.com/kolosovpetro/cloudflaremanagementpowershell
- Owner: kolosovpetro
- License: gpl-3.0
- Created: 2025-02-02T13:49:01.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-04-06T10:58:56.000Z (6 months ago)
- Last Synced: 2025-04-06T11:28:34.562Z (6 months ago)
- Topics: powershell, powershell-script
- Language: PowerShell
- Homepage: https://dev.azure.com/PetroKolosovProjects/CloudflareManagementPowershell
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare Management Powershell
A complete PowerShell solution for managing Cloudflare DNS records: fetch Zone ID, retrieve all DNS records, create new
records, update existing ones, delete records, or create/update. Includes SYNOPSIS documentation for better user
experience. Tested on ubuntu-latest and windows-latest agents using GitHub Actions and Azure Pipelines.- https://dev.azure.com/PetroKolosovProjects/CloudflareManagementPowershell
- https://www.powershellgallery.com/packages/CloudflareDnsTools/1.0.0## What's done so far
- PowerShell script to fetch Cloudflare Zone ID (including test)
- PowerShell script to fetch all DNS records by Cloudflare Zone ID (including test)
- PowerShell script to create new Cloudflare DNS record (including test)
- PowerShell script to update existing Cloudflare DNS record (including test)
- PowerShell script to create new or update existing Cloudflare DNS record (including test)
- PowerShell script to delete existing Cloudflare DNS record (including test)
- All PowerShell scripts that create or update are idempotent
- Add SYNOPSIS documentation for better user experience
- All scripts are tested on `ubuntu-latest` and `windows-latest` agents using `GitHub Actions`
- All scripts are tested on `ubuntu-latest` and `windows-latest` agents using `Azure Pipelines`## Import functions locally
- Import-Module .\CloudflareDnsTools.psd1
- Get-Command -Module CloudflareDnsTools
- Remove-Module CloudflareDnsTools## Install from PSGallery
- Install-Module -Name CloudflareDnsTools -Force -AllowClobber
- Get-Command -Module CloudflareDnsTools## Release to Gallery
- Install-Module -Name PowerShellGet -Force -SkipPublisherCheck
- Register-PSRepository -Default
- Test-ModuleManifest .\CloudflareDnsTools\CloudflareDnsTools.psd1
- Publish-Module -Path '.\CloudflareDnsTools' -Repository PSGallery -NuGetApiKey $env:PWSH_GALLERY_KEY -Verbose## Cloudflare API docs
- https://developers.cloudflare.com/api/resources/zones/methods/list/
- https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/list/
- https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/create/
- https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/delete/
- https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/edit/