Skip to content

Commit

Permalink
Merge pull request hashicorp#1 from johannac/fixdnscreate
Browse files Browse the repository at this point in the history
Refactor DNS Provider
  • Loading branch information
dshafik committed Sep 27, 2017
2 parents 2fb8def + 71e78fe commit e3e1997
Show file tree
Hide file tree
Showing 5 changed files with 1,168 additions and 844 deletions.
38 changes: 30 additions & 8 deletions builtin/providers/akamai/examples/dns/dns.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
provider "akamai" {
edgerc = "/Users/dshafik/.edgerc"
edgerc = "/Users/Johanna/.edgerc"
fastdns_section = "dns"
}

resource "akamai_fastdns_record" "test" {
hostname = "akamaideveloper.com"
name = "testing"
type = "Cname"
active = true
targets = ["developer.akamai.com."]
ttl = 30
resource "akamai_fastdns_zone" "test_zone" {
hostname = "akamaideveloper.net"
soa {
ttl = 900
originserver = "akamaideveloper.net."
contact = "hostmaster.akamaideveloper.net."
refresh = 900
retry = 300
expire = 604800
minimum = 180
}
a {
name = "web"
ttl = 900
active = true
target = "1.2.3.4"
}
a {
name = "www"
ttl = 600
active = true
target = "5.6.7.8"
}
cname {
name = "wwwq"
ttl = 600
active = true
target = "blog.akamaideveloper.net."
}
}
6 changes: 3 additions & 3 deletions builtin/providers/akamai/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package akamai
import (
"github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v1"
"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
"github.com/akamai/AkamaiOPEN-edgegrid-golang/papi-v1"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/akamai/AkamaiOPEN-edgegrid-golang/papi-v1"
)

func Provider() terraform.ResourceProvider {
Expand All @@ -27,8 +27,8 @@ func Provider() terraform.ResourceProvider {
},
},
ResourcesMap: map[string]*schema.Resource{
"akamai_fastdns_record": resourceFastDNSRecord(),
"akamai_property": resourceProperty(),
"akamai_fastdns_zone": resourceFastDNSZone(),
"akamai_property": resourceProperty(),
},
ConfigureFunc: providerConfigure,
}
Expand Down

0 comments on commit e3e1997

Please sign in to comment.