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

routing_rules: Fix schema #3

Merged
merged 1 commit into from
Apr 9, 2024
Merged

routing_rules: Fix schema #3

merged 1 commit into from
Apr 9, 2024

Conversation

nbrahms
Copy link
Contributor

@nbrahms nbrahms commented Apr 9, 2024

Resources and requestors are required, so should be attributes, not blocks (which are always optional).

Also improve documentation around setting the P0_API_TOKEN environment variable.

Resources and requestors are required, so should be attributes, not
blocks (which are always optional).

Also improve documentation around setting the P0_API_TOKEN environment
variable.
@nbrahms nbrahms requested a review from gergas3 April 9, 2024 15:02
- `type` (String) Determines trust requirements for access. If empty, access is disallowed. Except for 'deny', meeting any requirement is sufficient to grant access. Possible values:
- 'auto': Access is granted according to the requirements of the specified 'integration'
- 'deny': Access is always denied
- 'escalation': Access may be approved by on-call members of the specified services, who are paged when access is requested
Copy link

Choose a reason for hiding this comment

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

Suggested change
- 'escalation': Access may be approved by on-call members of the specified services, who are paged when access is requested
- 'escalation': Access may be approved by on-call members of the specified services, after the access request is escalated by the requestor

- 'deny': Access is always denied
- 'escalation': Access may be approved by on-call members of the specified services, who are paged when access is requested
- 'group': Access may be granted by any member of the defined directory group
- 'p0': Access may be granted by any user with the P0 approval role (defined in the P0 app)
Copy link

Choose a reason for hiding this comment

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

Suggested change
- 'p0': Access may be granted by any user with the P0 approval role (defined in the P0 app)
- 'p0': Access may be granted by any user with the P0 approver role (defined in the P0 app)

Comment on lines +134 to +140
- `directory` (String) May only be used if 'type' is 'group'. One of "azure-ad", "okta", or "workspace".
- `id` (String) May only be used if 'type' is 'group'. This is the directory's internal group identifier for matching approvers.
- `integration` (String) May only be used if 'type' is 'auto' or 'escalation'. Possible values:
- 'pagerduty': Access is granted if the requestor is on-call.
- `label` (String) May only be used if 'type' is 'group'. This is any human-readable name for the directory group specified in the 'id' attribute.
- `options` (Attributes) If present, determines additional trust requirements. (see [below for nested schema](#nestedatt--rule--approval--options))
- `services` (List of String) May only be used if 'type' is 'escalation'. Defines which services to page on escalation.
Copy link

Choose a reason for hiding this comment

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

I would reorder them so type=group and type=auto/escalation bullet points are together

Suggested change
- `directory` (String) May only be used if 'type' is 'group'. One of "azure-ad", "okta", or "workspace".
- `id` (String) May only be used if 'type' is 'group'. This is the directory's internal group identifier for matching approvers.
- `integration` (String) May only be used if 'type' is 'auto' or 'escalation'. Possible values:
- 'pagerduty': Access is granted if the requestor is on-call.
- `label` (String) May only be used if 'type' is 'group'. This is any human-readable name for the directory group specified in the 'id' attribute.
- `options` (Attributes) If present, determines additional trust requirements. (see [below for nested schema](#nestedatt--rule--approval--options))
- `services` (List of String) May only be used if 'type' is 'escalation'. Defines which services to page on escalation.
- `directory` (String) May only be used if 'type' is 'group'. One of "azure-ad", "okta", or "workspace".
- `id` (String) May only be used if 'type' is 'group'. This is the directory's internal group identifier for matching approvers.
- `label` (String) May only be used if 'type' is 'group'. This is any human-readable name for the directory group specified in the 'id' attribute.
- `integration` (String) May only be used if 'type' is 'auto' or 'escalation'. Possible values:
- 'pagerduty': Access is granted if the requestor is on-call.
- `services` (List of String) May only be used if 'type' is 'escalation'. Defines which services to page on escalation.
- `options` (Attributes) If present, determines additional trust requirements. (see [below for nested schema](#nestedatt--rule--approval--options))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just a code move; maybe we can address these markdown suggestions in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is automatically generated and will always be alphabetical.

@nbrahms nbrahms merged commit fb407d0 into main Apr 9, 2024
14 checks passed
@nbrahms nbrahms deleted the nathan/fix-rule-schema branch April 9, 2024 16:26
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