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

update documentation for pagerduty_extension #164

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion website/docs/r/extension.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ EOF
The following arguments are supported:

* `name` - (Optional) The name of the service extension.
* `endpoint_url` - (Optional) The url of the extension.
* `endpoint_url` - (Reqeuired|Optional) The url of the extension.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix the spelling on Required here?

Copy link
Contributor

Choose a reason for hiding this comment

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

What about leaving it Optional as that's how it is defined on the terraform schema, so terraform does not enforce it, but being more explicit about some exceptions for Generic V2 Webhook like described in https://github.com/terraform-providers/terraform-provider-pagerduty/issues/131#issuecomment-489375555 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

22cd0e6 fixed the typo @stmcallister

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the additional note! Nice job!

**Note:** The [endpoint URL is Optional API wise](https://api-reference.pagerduty.com/#!/Extensions/post_extensions) in most cases. But in some cases it is a _Required_ parameter. For example, `pagerduty_extension_schema` named `Generic V2 Webhook` doesn't accept `pagerduty_extension` with no `endpoint_url`, but one with named `Slack` accepts.
* `extension_schema` - (Required) This is the schema for this extension.
* `extension_objects` - (Required) This is the objects for which the extension applies (An array of service ids).
* `config` - (Optional) The configuration of the service extension as string containing plain JSON-encoded data.
Expand Down