Skip to content

Commit

Permalink
Merge pull request #225 from JupiterOne/APP-15944
Browse files Browse the repository at this point in the history
APP-15944 - Allow users to manage resource groups
  • Loading branch information
jzolo22 authored Nov 14, 2024
2 parents 7e0b725 + 281b841 commit 5e05be1
Show file tree
Hide file tree
Showing 19 changed files with 1,588 additions and 236 deletions.
26 changes: 26 additions & 0 deletions docs/data-sources/resource_group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jupiterone_resource_group Data Source - terraform-provider-jupiterone"
subcategory: ""
description: |-
A saved JupiterOne Resource Group.
---

# jupiterone_resource_group (Data Source)

A saved JupiterOne Resource Group.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The name of the resource group.

### Read-Only

- `id` (String) The ID of this resource.


14 changes: 13 additions & 1 deletion docs/resources/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resource "jupiterone_integration" "example_custom_file_transfer" {
"entities" = [
{
"id" = "Test",
"uniqueIdentified" = "758ba675-ff35-46aa-ae88-fd2d421a3c1f",
"uniqueIdentifier" = "758ba675-ff35-46aa-ae88-fd2d421a3c1f",
"_class" = "ThreatIntel",
"_keyField" = "test",
"_type" = "test"
Expand Down Expand Up @@ -72,10 +72,22 @@ resource "jupiterone_integration" "example_custom_integration" {

### Optional

- `collector_pool_id` (String) The ID of the collector pool.
- `description` (String) The description of the integration instance.
- `ingestion_sources_overrides` (List of Object) Overrides for ingestion sources. (see [below for nested schema](#nestedatt--ingestion_sources_overrides))
- `polling_interval_cron_expression` (String) The cron expression for the polling interval as a JSON string.
- `source_integration_instance_id` (String) The ID of the source integration instance.

### Read-Only

- `id` (String) The unique identifier of the integration instance.

<a id="nestedatt--ingestion_sources_overrides"></a>
### Nested Schema for `ingestion_sources_overrides`

Optional:

- `enabled` (Boolean)
- `ingestion_source_id` (String)


26 changes: 26 additions & 0 deletions docs/resources/resource_group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "jupiterone_resource_group Resource - terraform-provider-jupiterone"
subcategory: ""
description: |-
JupiterOne Resource Group
---

# jupiterone_resource_group (Resource)

JupiterOne Resource Group



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) The name of the resource group.

### Read-Only

- `id` (String) The ID of this resource.


43 changes: 15 additions & 28 deletions docs/resources/resource_permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,32 @@
page_title: "jupiterone_resource_permission Resource - terraform-provider-jupiterone"
subcategory: ""
description: |-
A set of resource based permissions.
JupiterOne Resource Based Permission
---

# jupiterone_resource_permission (Resource)

A set of JupiterOne Resource Permissions.
JupiterOne Resource Based Permission

## Example Usage

```terraform
data "jupiterone_user_group" "standard_administrators" {
name = "Administrators"
}
resource "jupiterone_resource_permission" "administrator_permissions" {
subject_id = data.jupiterone_user_group.standard_administrators.id
subject_type = "group"
resource_area = "rule"
resource_type = "*"
resource_id = "*"
can_create = true
can_read = true
can_update = true
can_delete = true
}
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `subject_id` (String) The ID of the subject that the resource permissions will be applied to (e.g. group ID).
- `subject_type` (String) The type of the subject that the resource permissions will be applied to (e.g. group).
- `resource_area` (String) The resource area that these permissions will be applied to (e.g. rule).
- `resource_type` (String) The resource type that these permissions will be applied to (e.g. rule, resource_group, \*).
- `resource_id` (String) The resource ID that these permissions will be applied to (e.g. rule ID, resource_group ID, \*).
- `can_read` (Boolean) Whether the subject can read the resource.
- `can_create` (Boolean) Whether the subject can create the resource.
- `can_update` (Boolean) Whether the subject can update the resource.
- `can_delete` (Boolean) Whether the subject can delete the resource.
- `can_read` (Boolean) Whether the subject can read the resource.
- `can_update` (Boolean) Whether the subject can update the resource.
- `resource_area` (String) The resource area that these permissions will be applied to (e.g. rule).
- `resource_id` (String) The ID of the resource that these permissions will be applied to (e.g. rule ID, resource group ID, *).
- `resource_type` (String) The resource type that these permissions will be applied to (e.g. rule, resource_group, *).
- `subject_id` (String) The ID of the subject that the resource permissions will be applied to (e.g. group ID).
- `subject_type` (String) The type of the subject that the resource permissions will be applied to (e.g. group).

### Read-Only

- `id` (String) The ID of this resource.


27 changes: 15 additions & 12 deletions docs/resources/rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ resource "jupiterone_rule" "unencrypted_critical_data_stores" {
tags = ["exampletag"]
labels = [{
label_name = "examplekey"
label_value = "examplevalue"
}]
outputs = [
"queries.query0.total",
"alertLevel"
Expand Down Expand Up @@ -104,7 +99,6 @@ resource "jupiterone_rule" "users_without_mfa" {
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required
Expand All @@ -116,25 +110,24 @@ resource "jupiterone_rule" "users_without_mfa" {
### Optional

- `ignore_previous_results` (Boolean)
- `labels` (Attributes List) Comma separated list of labelName/labelValue pairs to apply to the rule. (see [below for nested schema](#nestedatt--labels))
- `notify_on_failure` (Boolean)
- `outputs` (List of String) Names of properties that can be used throughout the rule evaluation process and will be included in each record of a rule evaluation. (e.g. queries.query0.total)
- `polling_interval` (String) Frequency of automated rule evaluation. Defaults to ONE_DAY.
- `question` (Block List) Contains properties related to queries used in the rule evaluation. (see [below for nested schema](#nestedblock--question))
- `question_id` (String) Specifies the ID of a question to be used in rule evaluation.
- `resource_group_id` (String) Specifies the ID of a resource group for the rule to be added to
- `spec_version` (Number) Rule evaluation specification version in the case of breaking changes.
- `tags` (List of String) Comma separated list of tags to apply to the jupiterone_rule entity. Value will always be true.
- `labels` (List of Attributes) Key/value pairs to apply to the jupiterone_rule entity. If label_value is a string that represents a boolean or number (i.e. "true", "1"), it will be converted to a boolean or number respectively.
- `tags` (List of String) Comma separated list of tags to apply to the rule.
- `templates` (Map of String) Optional key/value pairs of template name to template
- `trigger_on_new_only` (Boolean)
- `resource_group_id` (String) Optional ID of a resource group to associate with the rule.

### Read-Only

- `id` (String) Unique id that identifies the rule
- `version` (Number) Computed current version of the rule. Incremented each time the rule is updated.

<a id="nestedatt--operations"></a>

### Nested Schema for `operations`

Required:
Expand All @@ -145,16 +138,24 @@ Optional:

- `when` (String)

<a id="nestedblock--question"></a>

<a id="nestedatt--labels"></a>
### Nested Schema for `labels`

Required:

- `label_name` (String) Name of the label
- `label_value` (String) Value of the label, which is represented in TF as a string but will be treated as string, number or boolean in the application


<a id="nestedblock--question"></a>
### Nested Schema for `question`

Optional:

- `queries` (Block List) Contains properties related to queries used in the rule evaluation. (see [below for nested schema](#nestedblock--question--queries))

<a id="nestedblock--question--queries"></a>

### Nested Schema for `question.queries`

Required:
Expand All @@ -166,3 +167,5 @@ Optional:

- `include_deleted` (Boolean)
- `name` (String)


Loading

0 comments on commit 5e05be1

Please sign in to comment.