Skip to content

Commit

Permalink
[ROOT-1030] Remove immutable fields from docs and payload, and add de…
Browse files Browse the repository at this point in the history
…precation warning to Resource.
  • Loading branch information
azanar committed Oct 24, 2024
1 parent 995a180 commit 4a68c23
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions client/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ type Role struct {
Name string `jsonapi:"attr,name,omitempty"`
Slug string `jsonapi:"attr,slug,omitempty"`
IncidentPermissionSetId string `jsonapi:"attr,incident_permission_set_id,omitempty"`
IsDeletable *bool `jsonapi:"attr,is_deletable,omitempty"`
IsEditable *bool `jsonapi:"attr,is_editable,omitempty"`
AlertsPermissions []interface{} `jsonapi:"attr,alerts_permissions,omitempty"`
PulsesPermissions []interface{} `jsonapi:"attr,pulses_permissions,omitempty"`
ApiKeysPermissions []interface{} `jsonapi:"attr,api_keys_permissions,omitempty"`
Expand Down
2 changes: 0 additions & 2 deletions docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ description: |-
- `incident_types_permissions` (List of String) Value must be one of `create`, `read`, `update`, `delete`.
- `incidents_permissions` (List of String) Value must be one of `create`, `read`, `update`, `delete`.
- `invitations_permissions` (List of String) Value must be one of `create`, `read`, `update`, `delete`.
- `is_deletable` (Boolean) Whether the role can be deleted.. Value must be one of true or false
- `is_editable` (Boolean) Whether the role can be edited.. Value must be one of true or false
- `playbooks_permissions` (List of String) Value must be one of `create`, `read`, `update`, `delete`.
- `private_incidents_permissions` (List of String) Value must be one of `create`, `read`, `update`, `delete`.
- `pulses_permissions` (List of String) Value must be one of `create`, `update`, `read`.
Expand Down
2 changes: 2 additions & 0 deletions provider/resource_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func resourceRole() *schema.Resource {
Required: false,
Optional: true,
Description: "Whether the role can be deleted.. Value must be one of true or false",
DeprecationMessage: "This resource is now ignored by the API, and will be removed in the next release.",

Check failure on line 58 in provider/resource_role.go

View workflow job for this annotation

GitHub Actions / Build

unknown field DeprecationMessage in struct literal of type schema.Schema

Check failure on line 58 in provider/resource_role.go

View workflow job for this annotation

GitHub Actions / Build

unknown field DeprecationMessage in struct literal of type schema.Schema
},

"is_editable": &schema.Schema{
Expand All @@ -63,6 +64,7 @@ func resourceRole() *schema.Resource {
Required: false,
Optional: true,
Description: "Whether the role can be edited.. Value must be one of true or false",
DeprecationMessage: "This resource is now ignored by the API, and will be removed in the next release.",

Check failure on line 67 in provider/resource_role.go

View workflow job for this annotation

GitHub Actions / Build

unknown field DeprecationMessage in struct literal of type schema.Schema

Check failure on line 67 in provider/resource_role.go

View workflow job for this annotation

GitHub Actions / Build

unknown field DeprecationMessage in struct literal of type schema.Schema
},

"alerts_permissions": &schema.Schema{
Expand Down

0 comments on commit 4a68c23

Please sign in to comment.