Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add default ttl to digitalocean_record #791

Merged
merged 1 commit into from
Feb 17, 2022
Merged

docs: add default ttl to digitalocean_record #791

merged 1 commit into from
Feb 17, 2022

Conversation

unixlab
Copy link
Contributor

@unixlab unixlab commented Feb 15, 2022

figured it out myself and thought it might be helpful in the docs.

Copy link
Contributor

@ChiefMateStarbuck ChiefMateStarbuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello UnixLab. Thank you for the contribution. Where did you find the answer to this?

@unixlab
Copy link
Contributor Author

unixlab commented Feb 17, 2022

I figured this out by letting it run against the API while setting TF_LOG=trace:

---[ REQUEST ]---------------------------------------
POST /v2/domains/<redacted my domain>/records HTTP/1.1
Host: api.digitalocean.com
User-Agent: Terraform/1.1.5 godo/1.69.1
Content-Length: 89
Accept: application/json
Content-Type: application/json
Accept-Encoding: gzip

{
 "type": "A",
 "name": "test",
 "data": "127.0.0.1",
 "priority": 0,
 "port": 0,
 "weight": 0,
 "flags": 0
}
---[ RESPONSE ]--------------------------------------
HTTP/2.0 201 Created
Content-Length: 155
Cache-Control: max-age=0, private, must-revalidate
Cf-Cache-Status: DYNAMIC
Cf-Ray: <redacted>
Content-Type: application/json; charset=utf-8
Date: Thu, 17 Feb 2022 11:24:36 GMT
Expect-Ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Ratelimit-Limit: 5000
Ratelimit-Remaining: 4976
Ratelimit-Reset: 1645100658
Server: cloudflare
Set-Cookie: <redacted>
X-Gateway: Edge-Gateway
X-Request-Id: <redacted>
X-Response-From: service

{
 "domain_record": {
  "id": 295198840,
  "type": "A",
  "name": "test",
  "data": "127.0.0.1",
  "priority": null,
  "port": null,
  "ttl": 1800,
  "weight": null,
  "flags": null,
  "tag": null
 }
}

To technically the default comes from the API and not the terraform provider code.

@ChiefMateStarbuck
Copy link
Contributor

Awesome. Thank you so much.

@ChiefMateStarbuck ChiefMateStarbuck merged commit b509a0d into digitalocean:main Feb 17, 2022
@MattIPv4
Copy link
Member

Hey, @unixlab - Thanks a ton for this sweet PR! 😄

Would you please shoot me an email when you get a chance?
mcowley at digitalocean dot com 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants