Skip to content
/ cafe Public
forked from duythinht/cafe

CLI for manage cloudflare records by jsonnet

Notifications You must be signed in to change notification settings

namcxn/cafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cafe

CLI for manage cloudflare records by jsonnet

How to?

  • Install the CLI
go install github.com/duythinht/cafe/cmd/cafe
  • Configuration by those environment

    • CLOUDFLARE_API_TOKEN: token, get from cloudflare
    • ZONES_DIR: folder of zones, contains jsonnet files of records definition, default is ./zones
    • CAFE_CONFIRM: yes/no, apply to cf (default no, which just dry run)
  • RUN, example:

♺ duythinht[at]factory ♺ ~/workspace/github.com/duythinht/cafe ♺  ❯
❯❯❯ CAFE_CONFIRM=yes go run cmd/cafe/main.go
Those records will be deleted:
ZONE        TYPE    TTL   NAME                    CONTENT
0x7e6.com   A       1     hello.0x7e6.com         104.21.23.167
0x7e6.com   TXT     1     just-txt.0x7e6.com      hello-world!

Those records will be created:
ZONE        TYPE    TTL   NAME                    CONTENT
0x7e6.com   A       1     hello.0x7e6.com         104.21.13.167
0x7e6.com   TXT     1     just-txt.0x7e6.com      ok-hello-world!
deleting 0x7e6.com   A       1     hello.0x7e6.com         104.21.23.167...
deleting 0x7e6.com   TXT     1     just-txt.0x7e6.com      hello-world!...
creating 0x7e6.com   A       1     hello.0x7e6.com         104.21.13.167... true
creating 0x7e6.com   TXT     1     just-txt.0x7e6.com      ok-hello-world!... true

Why not terraform

Cause tf is too slow, it's terrible.

About

CLI for manage cloudflare records by jsonnet

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 91.8%
  • Jsonnet 8.2%