Skip to content
/ libdns-exoscale Public template
forked from libdns/template

Empty template for new libdns provider package implementations

License

Notifications You must be signed in to change notification settings

mlec1/libdns-exoscale

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exoscale for libdns

Go Reference

This package implements the libdns interfaces for Exoscale, allowing you to manage DNS records.

Configuration


This provider expects the following configuration:

Required

  • APIKey: Exoscale API Key
  • APISecret: Exoscale API Secret

Here is an example of the minimum permissions you can set for the role associated to your API Key.

{
  "default-service-strategy": "deny",
  "services": {
    "dns": {
      "type": "rules",
      "rules": [
        {
          "expression": "operation == 'list-dns-domains'",
          "action": "allow"
        },
        {
          "expression": "!(resources.dns_domain.unicode_name in [\"example.com\"])",
          "action": "deny"
        },
        {
          "expression": "true",
          "action": "allow"
        }
      ]
    }
  }
}

Testing


For testing, set the TEST_API_KEY, TEST_API_SECRET and TEST_ZONE as environment variable.

$ TEST_API_KEY="EXO..." TEST_API_SECRET="..." TEST_ZONE="example.com" go test -v
=== RUN   Test_AppendRecords
--- PASS: Test_AppendRecords (13.89s)
=== RUN   Test_DeleteRecords
--- PASS: Test_DeleteRecords (7.37s)
=== RUN   Test_GetRecords
--- PASS: Test_GetRecords (7.89s)
=== RUN   Test_SetRecords
--- PASS: Test_SetRecords (14.23s)
PASS
ok  	github.com/libdns/exoscale	43.393s

About

Empty template for new libdns provider package implementations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%