Skip to content

Commit 03bf1b9

Browse files
Merge pull request #751 from jedelson-pagerduty/issue/correct-custom-fields-documentation
add missing properties to incident_custom_field resource documentation
2 parents 3cdf794 + c19de50 commit 03bf1b9

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

website/docs/r/incident_custom_field.html.markdown

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,25 @@ An [Incident Custom Field](https://support.pagerduty.com/docs/custom-fields-on-i
1414

1515
```hcl
1616
resource "pagerduty_incident_custom_field" "cs_impact" {
17-
name = "impact"
18-
data_type = "string"
19-
field_type = "single_value"
17+
name = "impact"
18+
display_name = "Customer Impact"
19+
data_type = "string"
20+
field_type = "single_value"
2021
}
2122
2223
resource "pagerduty_incident_custom_field" "sre_environment" {
23-
name = "environment"
24-
data_type = "string"
25-
field_type = "single_value_fixed"
24+
name = "environment"
25+
display_name = "Environment"
26+
data_type = "string"
27+
field_type = "single_value_fixed"
28+
}
29+
30+
resource "pagerduty_incident_custom_field" "false_alarm" {
31+
name = "false_alarm"
32+
display_name = "False Alarm"
33+
data_type = "boolean"
34+
field_type = "single_value"
35+
default_value = "false"
2636
}
2737
```
2838

@@ -31,8 +41,11 @@ resource "pagerduty_incident_custom_field" "sre_environment" {
3141
The following arguments are supported:
3242

3343
* `name` - (Required) The name of the field.
44+
* `display_name` - (Required) The display name of the field.
45+
* `description` - (Optional) The description of the field.
3446
* `data_type` - (Required) The data type of the field. Must be one of `string`, `integer`, `float`, `boolean`, `datetime`, or `url`.
35-
* `field_type` - (Required) The field type of the field. Must be one of `single_value`, `single_value_fixed`, `multi_value`, or `multi_value_fixed`.
47+
* `field_type` - (Required) The field type of the field. Must be one of `single_value`, `single_value_fixed`, `multi_value`, or `multi_value_fixed`.
48+
* `default_value` - (Optional) The default value to set when new incidents are created. Always specified as a string.
3649

3750
## Attributes Reference
3851

website/docs/r/incident_custom_field_option.html.markdown

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ i.e. has the `field_type` of `single_value_fixed` or `multi_value_fixed`.
1515

1616
```hcl
1717
resource "pagerduty_incident_custom_field" "sre_environment" {
18-
name = "environment"
19-
data_type = "string"
20-
field_type = "single_value_fixed"
18+
name = "environment"
19+
display_name = "Environment"
20+
data_type = "string"
21+
field_type = "single_value_fixed"
2122
}
2223
2324
resource "pagerduty_incident_custom_field_option" "dev_environment" {
24-
field = pagerduty_incident_custom_field.sre_environment.id
25+
field = pagerduty_incident_custom_field.sre_environment.id
2526
data_type = "string"
26-
value = "dev"
27+
value = "dev"
2728
}
2829
2930
resource "pagerduty_incident_custom_field_option" "stage_environment" {

0 commit comments

Comments
 (0)