Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fgh151/dnscode
Menage dns records as code
https://github.com/fgh151/dnscode
dns infrastructure-as-code
Last synced: 13 days ago
JSON representation
Menage dns records as code
- Host: GitHub
- URL: https://github.com/fgh151/dnscode
- Owner: fgh151
- Created: 2021-04-06T10:13:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-08T03:39:32.000Z (almost 2 years ago)
- Last Synced: 2024-11-21T23:28:53.287Z (2 months ago)
- Topics: dns, infrastructure-as-code
- Language: Go
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
DNSCODE
-------Control DNS records in single file independent of provider.
### Supported providers:
* Pdd yandex
* Reg.ru
* Adman.com### Usage:
Create file dnscode.json for example
```json
{
"zones": [
{
"provider": "yandex",
"name": "example.ru",
"records": null,
"connection": {
"PddToken": "token from page https://pddimp.yandex.ru/api2/admin/get_token"
}
},
{
"provider": "adman",
"name": "example.org",
"records": null,
"connection": {
"login": "login to adman",
"mdpass": "api key generated on page https://adman.com/pages/api/"
}
},
{
"provider": "regru",
"name": "example.com",
"records": null,
"connection": {
"password": "password",
"username": "login"
}
}
]
}
```Then you can import records:
```shell
dnscode import
```This command import records. Allowed flags:
* --filename - filename which will contain imported record
* --useImport=true|false - if true dnscode will create own file for each zone (default true)Now you can manage zone by edit file. After you can see changes:
```shell
dnscode plan
```
And apply changes
```shell
dnscode apply
```Allowed flags for apply command:
* --force=true|false - delete records from provider (default true)
* --interactive=true|false - confirm apply? (default true)Flags for all commands:
* --proxy=addr.com - proxy server. For example see proxy/server.go### Add provider
To create a new provider, add provider file to providers folder,
create provider struct which implement providers.BaseProvider.
Add your provider to function GetProvider() in file providers/base.go