{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/38802615","id":38802615,"diff_hunk":"@@ -0,0 +1,166 @@\n+package ultradns\n+\n+import (\n+\t\"fmt\"\n+\t\"log\"\n+\t\"strconv\"\n+\t\"github.com/hashicorp/terraform/helper/schema\"\n+\t\"github.com/Ensighten/udnssdk\"\n+)\n+\n+func resourceUltraDNSRecord() *schema.Resource {\n+\treturn &schema.Resource{\n+\t\tCreate: resourceUltraDNSRecordCreate,\n+\t\tRead:   resourceUltraDNSRecordRead,\n+\t\tUpdate: resourceUltraDNSRecordUpdate,\n+\t\tDelete: resourceUltraDNSRecordDelete,\n+\n+\t\tSchema: map[string]*schema.Schema{\n+\t\t\t\"zone\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"name\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\n+\t\t\t\"hostname\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tComputed: true,\n+\t\t\t},\n+\n+\t\t\t\"type\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tRequired: true,\n+\t\t\t\tForceNew: true,\n+\t\t\t},\n+\t\t\t\"rdata\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeList,\n+\t\t\t\tRequired: true,\n+\t\t\t\tElem:     &schema.Schema{Type: schema.TypeString},\n+\t\t\t},\n+\n+\t\t\t\"ttl\": &schema.Schema{\n+\t\t\t\tType:     schema.TypeString,\n+\t\t\t\tOptional: true,\n+\t\t\t\tDefault:  \"3600\",\n+\t\t\t},\n+\t\t},\n+\t}\n+}\n+\n+func resourceUltraDNSRecordCreate(d *schema.ResourceData, meta interface{}) error {\n+\tclient := meta.(*udnssdk.Client)\n+\tnewRecord := &udnssdk.RRSet{\n+\t\tOwnerName: d.Get(\"name\").(string),\n+\t\tRRType:    d.Get(\"type\").(string),\n+\t}\n+\trdata := d.Get(\"rdata\").([]interface{})\n+\trdatas := make([]string, len(rdata))\n+\tfor i, j := range rdata {\n+\t\trdatas[i] = j.(string)\n+\t}\n+\tnewRecord.RData = rdatas\n+\tif ttl, ok := d.GetOk(\"ttl\"); ok {","path":"builtin/providers/ultradns/resource_ultradns_record.go","position":68,"original_position":68,"commit_id":"6b2e2a9f418b142c3bee0979dd5bed5febfbe424","original_commit_id":"6b2e2a9f418b142c3bee0979dd5bed5febfbe424","user":{"login":"phinze","id":37534,"avatar_url":"https://avatars.githubusercontent.com/u/37534?v=3","gravatar_id":"","url":"https://api.github.com/users/phinze","html_url":"https://github.com/phinze","followers_url":"https://api.github.com/users/phinze/followers","following_url":"https://api.github.com/users/phinze/following{/other_user}","gists_url":"https://api.github.com/users/phinze/gists{/gist_id}","starred_url":"https://api.github.com/users/phinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phinze/subscriptions","organizations_url":"https://api.github.com/users/phinze/orgs","repos_url":"https://api.github.com/users/phinze/repos","events_url":"https://api.github.com/users/phinze/events{/privacy}","received_events_url":"https://api.github.com/users/phinze/received_events","type":"User","site_admin":false},"body":"Looks like `\"ttl\"` has a default set, so you can just assume it is there.","created_at":"2015-09-04T23:31:14Z","updated_at":"2015-09-04T23:31:14Z","html_url":"https://github.com/hashicorp/terraform/pull/2716#discussion_r38802615","pull_request_url":"https://api.github.com/repos/hashicorp/terraform/pulls/2716","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments/38802615"},"html":{"href":"https://github.com/hashicorp/terraform/pull/2716#discussion_r38802615"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/2716"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/terraform/pulls/2716","id":39862763,"html_url":"https://github.com/hashicorp/terraform/pull/2716","diff_url":"https://github.com/hashicorp/terraform/pull/2716.diff","patch_url":"https://github.com/hashicorp/terraform/pull/2716.patch","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/2716","number":2716,"state":"open","locked":false,"title":"UltraDNS Provider","user":{"login":"jmasseo","id":916540,"avatar_url":"https://avatars.githubusercontent.com/u/916540?v=3","gravatar_id":"","url":"https://api.github.com/users/jmasseo","html_url":"https://github.com/jmasseo","followers_url":"https://api.github.com/users/jmasseo/followers","following_url":"https://api.github.com/users/jmasseo/following{/other_user}","gists_url":"https://api.github.com/users/jmasseo/gists{/gist_id}","starred_url":"https://api.github.com/users/jmasseo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmasseo/subscriptions","organizations_url":"https://api.github.com/users/jmasseo/orgs","repos_url":"https://api.github.com/users/jmasseo/repos","events_url":"https://api.github.com/users/jmasseo/events{/privacy}","received_events_url":"https://api.github.com/users/jmasseo/received_events","type":"User","site_admin":false},"body":"I've implemented a simple UltraDNS provider that can manage DNS records with UltraDNS' REST API.\r\nI've included documentation and acceptance tests.\r\n\r\nIt is 'inspired' by the DNSimple provider.","created_at":"2015-07-13T22:14:19Z","updated_at":"2015-09-04T23:31:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0e1c898cdcb23ff9522469de00d8e8882bb994b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/terraform/pulls/2716/commits","review_comments_url":"https://api.github.com/repos/hashicorp/terraform/pulls/2716/comments","review_comment_url":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/2716/comments","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/6b2e2a9f418b142c3bee0979dd5bed5febfbe424","head":{"label":"Ensighten:master","ref":"master","sha":"6b2e2a9f418b142c3bee0979dd5bed5febfbe424","user":{"login":"Ensighten","id":883274,"avatar_url":"https://avatars.githubusercontent.com/u/883274?v=3","gravatar_id":"","url":"https://api.github.com/users/Ensighten","html_url":"https://github.com/Ensighten","followers_url":"https://api.github.com/users/Ensighten/followers","following_url":"https://api.github.com/users/Ensighten/following{/other_user}","gists_url":"https://api.github.com/users/Ensighten/gists{/gist_id}","starred_url":"https://api.github.com/users/Ensighten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ensighten/subscriptions","organizations_url":"https://api.github.com/users/Ensighten/orgs","repos_url":"https://api.github.com/users/Ensighten/repos","events_url":"https://api.github.com/users/Ensighten/events{/privacy}","received_events_url":"https://api.github.com/users/Ensighten/received_events","type":"Organization","site_admin":false},"repo":{"id":38833944,"name":"terraform","full_name":"Ensighten/terraform","owner":{"login":"Ensighten","id":883274,"avatar_url":"https://avatars.githubusercontent.com/u/883274?v=3","gravatar_id":"","url":"https://api.github.com/users/Ensighten","html_url":"https://github.com/Ensighten","followers_url":"https://api.github.com/users/Ensighten/followers","following_url":"https://api.github.com/users/Ensighten/following{/other_user}","gists_url":"https://api.github.com/users/Ensighten/gists{/gist_id}","starred_url":"https://api.github.com/users/Ensighten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ensighten/subscriptions","organizations_url":"https://api.github.com/users/Ensighten/orgs","repos_url":"https://api.github.com/users/Ensighten/repos","events_url":"https://api.github.com/users/Ensighten/events{/privacy}","received_events_url":"https://api.github.com/users/Ensighten/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ensighten/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":true,"url":"https://api.github.com/repos/Ensighten/terraform","forks_url":"https://api.github.com/repos/Ensighten/terraform/forks","keys_url":"https://api.github.com/repos/Ensighten/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ensighten/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ensighten/terraform/teams","hooks_url":"https://api.github.com/repos/Ensighten/terraform/hooks","issue_events_url":"https://api.github.com/repos/Ensighten/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/Ensighten/terraform/events","assignees_url":"https://api.github.com/repos/Ensighten/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/Ensighten/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/Ensighten/terraform/tags","blobs_url":"https://api.github.com/repos/Ensighten/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ensighten/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ensighten/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ensighten/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ensighten/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/Ensighten/terraform/languages","stargazers_url":"https://api.github.com/repos/Ensighten/terraform/stargazers","contributors_url":"https://api.github.com/repos/Ensighten/terraform/contributors","subscribers_url":"https://api.github.com/repos/Ensighten/terraform/subscribers","subscription_url":"https://api.github.com/repos/Ensighten/terraform/subscription","commits_url":"https://api.github.com/repos/Ensighten/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ensighten/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ensighten/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ensighten/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ensighten/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/Ensighten/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ensighten/terraform/merges","archive_url":"https://api.github.com/repos/Ensighten/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ensighten/terraform/downloads","issues_url":"https://api.github.com/repos/Ensighten/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/Ensighten/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/Ensighten/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/Ensighten/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ensighten/terraform/labels{/name}","releases_url":"https://api.github.com/repos/Ensighten/terraform/releases{/id}","created_at":"2015-07-09T17:04:14Z","updated_at":"2015-07-09T17:04:18Z","pushed_at":"2015-07-13T22:11:21Z","git_url":"git://github.com/Ensighten/terraform.git","ssh_url":"git@github.com:Ensighten/terraform.git","clone_url":"https://github.com/Ensighten/terraform.git","svn_url":"https://github.com/Ensighten/terraform","homepage":"http://www.terraform.io","size":28342,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"e28671490a811199d3a9685c15c21b00d4d568e8","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":17728164,"name":"terraform","full_name":"hashicorp/terraform","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/terraform","description":"Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.","fork":false,"url":"https://api.github.com/repos/hashicorp/terraform","forks_url":"https://api.github.com/repos/hashicorp/terraform/forks","keys_url":"https://api.github.com/repos/hashicorp/terraform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/terraform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/terraform/teams","hooks_url":"https://api.github.com/repos/hashicorp/terraform/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/terraform/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/terraform/events","assignees_url":"https://api.github.com/repos/hashicorp/terraform/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/terraform/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/terraform/tags","blobs_url":"https://api.github.com/repos/hashicorp/terraform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/terraform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/terraform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/terraform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/terraform/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/terraform/languages","stargazers_url":"https://api.github.com/repos/hashicorp/terraform/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/terraform/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/terraform/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/terraform/subscription","commits_url":"https://api.github.com/repos/hashicorp/terraform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/terraform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/terraform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/terraform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/terraform/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/terraform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/terraform/merges","archive_url":"https://api.github.com/repos/hashicorp/terraform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/terraform/downloads","issues_url":"https://api.github.com/repos/hashicorp/terraform/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/terraform/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/terraform/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/terraform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/terraform/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/terraform/releases{/id}","created_at":"2014-03-13T22:25:48Z","updated_at":"2015-09-04T22:15:57Z","pushed_at":"2015-09-04T23:23:20Z","git_url":"git://github.com/hashicorp/terraform.git","ssh_url":"git@github.com:hashicorp/terraform.git","clone_url":"https://github.com/hashicorp/terraform.git","svn_url":"https://github.com/hashicorp/terraform","homepage":"http://www.terraform.io","size":51583,"stargazers_count":2953,"watchers_count":2953,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":632,"mirror_url":null,"open_issues_count":580,"forks":632,"open_issues":580,"watchers":2953,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/2716"},"html":{"href":"https://github.com/hashicorp/terraform/pull/2716"},"issue":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/2716"},"comments":{"href":"https://api.github.com/repos/hashicorp/terraform/issues/2716/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/2716/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/terraform/pulls/2716/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/terraform/statuses/6b2e2a9f418b142c3bee0979dd5bed5febfbe424"}}}}