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

Improve the ruleset_rule time_frame documentation #340

Conversation

metavida
Copy link
Contributor

@metavida metavida commented May 26, 2021

Specifically, the previous description of how to choose a start_time value was misleading & did not explain how picking a correct value also involves the specified timezone

Also update the code example to demonstrate how to use the time_static resource for slightly more human-readable configuration. Best I could tell there is not a way to use other built-in time functions like formatdate to create a unix epoch timestamp, which is why I picked the time_static resource.

A future improvement to the provider might include allowing users to specify start_time and other unix timestamp attributes using RFC 3339 "Date and Time format" syntax, but that improvement is out of the scope of this PR.

@metavida metavida force-pushed the improve-ruleset_rule-time_frame-documentation branch from 1a54528 to 75f4378 Compare May 26, 2021 19:46
Specifically, the previous description of how to choose a `start_time` value was misleading & did not explain how picking a correct value also involves the specified `timezone`

Also update the code example to use the `time_static` resource.
@metavida metavida force-pushed the improve-ruleset_rule-time_frame-documentation branch from 75f4378 to 49c5f46 Compare May 26, 2021 19:46
Co-authored-by: Tyurina <tyurina@pagerduty.com>
@metavida metavida force-pushed the improve-ruleset_rule-time_frame-documentation branch from 187850e to 9321231 Compare May 26, 2021 20:02
Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

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

Overall, looks great! Please just update the variables to use the current syntax. Thanks!

website/docs/r/ruleset_rule.html.markdown Outdated Show resolved Hide resolved
website/docs/r/ruleset_rule.html.markdown Outdated Show resolved Hide resolved
website/docs/r/ruleset_rule.html.markdown Outdated Show resolved Hide resolved
@metavida
Copy link
Contributor Author

Ah! Good catch, @stmcallister ! I've removed those 3 cases of "interpolation-only expressions" in e3f0ec6 and tested locally to confirm that the syntax still works as expected 👍

Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

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

👍 🎉 Awesome! Thank you! LGTM.

@stmcallister stmcallister merged commit 9e06639 into PagerDuty:master May 27, 2021
@metavida metavida deleted the improve-ruleset_rule-time_frame-documentation branch May 27, 2021 18:37
@metavida
Copy link
Contributor Author

Thanks so much for getting this merged! Will the documentation changes to live at https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/resources/ruleset_rule when we (i.e. you) release a new version of the terraform provider?

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.

2 participants