Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tilfin/gcdns-cli
Google Cloud DNS CLI
https://github.com/tilfin/gcdns-cli
cli-app google-cloud-dns
Last synced: 25 days ago
JSON representation
Google Cloud DNS CLI
- Host: GitHub
- URL: https://github.com/tilfin/gcdns-cli
- Owner: tilfin
- License: mit
- Created: 2017-06-13T15:55:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-13T16:41:38.000Z (over 7 years ago)
- Last Synced: 2024-10-24T01:37:24.037Z (2 months ago)
- Topics: cli-app, google-cloud-dns
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gcdns
## Build
```
$ go build -o gcdns main.go
```### Windows
```
$ GOOS=windows GOARCH=386 go build -o gcdns.exe main.go
```## Usage
```
$ ./gcdns --help
usage: gcdns --project=PROJECT --mz=MZ [] [ ...]Google Cloud DNS CLI
Flags:
--help Show context-sensitive help (also try --help-long and
--help-man).
--keyfile=KEYFILE JSON key file
--project=PROJECT Project name of Google Cloud
--mz=MZ Target managed zone of projectCommands:
help [...]
Show help.list
list recordset
set record```
## Examples
### Show list record sets
```
$ ./gcdns list --keyfile company-abcdef012345.json --project high-office-XXX --mz ddns-example-net
+-----------------------------+------+------------------------------------------------------------------+
| Name | Type | Value |
+-----------------------------+------+------------------------------------------------------------------+
| ddns.example.net. | NS | ns-cloud-c1.googledomains.com. |
| | | ns-cloud-c2.googledomains.com. |
| | | ns-cloud-c3.googledomains.com. |
| | | ns-cloud-c4.googledomains.com. |
+-----------------------------+------+------------------------------------------------------------------+
| ddns.example.net. | SOA | ns.googledomains.com. admin.google.com. 0 21600 3600 1209600 300 |
+-----------------------------+------+------------------------------------------------------------------+
| local.ddns.example.net. | A | 127.0.0.1 |
+-----------------------------+------+------------------------------------------------------------------+
```### Set A record
Set IP address of the host where you logged in
```
$ ./gcdns set --keyfile company-abcdef012345.json --project high-office-XXX --mz ddns-example-net \
mine.ddns.example.net `curl ifconfig.io 2> /dev/null`
A record of mine.ddns.example.net has changed (new IP address: 12.34.56.78).
```## References
* [
Google Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials)