-
Notifications
You must be signed in to change notification settings - Fork 137
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
Validate TTL in zone_record to >=60 #397
Conversation
…request contains a value below. This cause terraform to update the record at each `apply`. This patch validates that the TTL set by the user in his script is > to 60.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
Just a suggestion regarding the error message
Feedback from review on error message wording Co-authored-by: Aurelie Vache <[email protected]>
CDS Report terraform-provider-ovh-check#1506.0 ✘
|
CDS Report terraform-provider-ovh-check#1507.0 ✘
|
CDS Report terraform-provider-ovh-testacc#1506.0 ✘
|
CDS Report terraform-provider-ovh-testacc#1507.0 ✘
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
$ terraform apply
╷
│ Error: "ttl" must be greater than or equal to 60, got: 50
│
│ with ovh_domain_zone_record.test,
│ on pr397.tf line 5, in resource "ovh_domain_zone_record" "test":
│ 5: ttl = 50
CDS Report terraform-provider-ovh-check#1508.0 ✔
|
CDS Report terraform-provider-ovh-check#1509.0 ✔
|
CDS Report terraform-provider-ovh-testacc#1508.0 ✘
|
CDS Report terraform-provider-ovh-testacc#1509.0 ✘
|
Description
the zone record route sets the TTL to 60 (and return 200) even if the request contains a value below. This cause terraform to update the record at each
apply
.This patch validates that the TTL set by the user in his script is >= to 60.
Type of change
Please delete options that are not relevant.
This will be a breaking for user that set TTL to a value below 60. However, in that case, their value is not set since the server set the value to 60
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
make testacc TESTARGS="-run TestAccDomainZoneRecord_Basic"
Checklist:
go mod vendor
if I added or modifygo.mod
file