-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⭐️ add the SCIM group mapping resource (#48)
- Loading branch information
1 parent
c1859ce
commit 4b97c45
Showing
9 changed files
with
443 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "mondoo_querypack_assignment Resource - terraform-provider-mondoo" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# mondoo_querypack_assignment (Resource) | ||
|
||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
mondoo = { | ||
source = "mondoohq/mondoo" | ||
} | ||
} | ||
} | ||
provider "mondoo" { | ||
region = "us" | ||
} | ||
resource "mondoo_space" "my_space" { | ||
name = "My Space Name" | ||
org_id = "your-org-1234567" | ||
} | ||
resource "mondoo_querypack_assignment" "space" { | ||
space_id = mondoo_space.my_space.id | ||
querypacks = [ | ||
"//policy.api.mondoo.app/policies/mondoo-incident-response-aws", | ||
] | ||
state = "enabled" # default is enabled, we also support preview and disabled | ||
depends_on = [ | ||
mondoo_space.my_space | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `space_id` (String) Mondoo Space Identifier. | ||
|
||
### Optional | ||
|
||
- `querypacks` (List of String) QueryPacks to assign to the space. | ||
- `state` (String) QueryPack Assignment State (enabled, disabled). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "mondoo_scim_group_mapping Resource - terraform-provider-mondoo" | ||
subcategory: "" | ||
description: |- | ||
This resource provides SCIM 2.0 Group Mapping. It allows the mapping of SCIM 2.0 groups to Mondoo organization or spaces and IAM roles. | ||
--- | ||
|
||
# mondoo_scim_group_mapping (Resource) | ||
|
||
This resource provides SCIM 2.0 Group Mapping. It allows the mapping of SCIM 2.0 groups to Mondoo organization or spaces and IAM roles. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
mondoo = { | ||
source = "mondoohq/mondoo" | ||
} | ||
} | ||
} | ||
provider "mondoo" { | ||
} | ||
resource "mondoo_space" "my_space_1" { | ||
name = "My Space 1" | ||
org_id = "your-org-1234567" | ||
} | ||
resource "mondoo_scim_group_mapping" "MondooAdmin" { | ||
org_id = "your-org-1234567" | ||
group = "MondooAdmin" | ||
mappings = [ | ||
# Give admin group access to the organization | ||
{ | ||
org_mrn : "//captain.api.mondoo.app/organizations/your-org-1234567", | ||
iam_role : "//iam.api.mondoo.app/roles/editor" | ||
}, | ||
# Give admin group access to the space | ||
{ | ||
space_mrn : mondoo_space.my_space_1.mrn, | ||
iam_role : "//iam.api.mondoo.app/roles/viewer" | ||
} | ||
] | ||
depends_on = [ | ||
mondoo_space.my_space_1 | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `group` (String) SCIM 2.0 Group Display Name. | ||
- `mappings` (Attributes List) (see [below for nested schema](#nestedatt--mappings)) | ||
- `org_id` (String) Mondoo Organization Identifier. | ||
|
||
<a id="nestedatt--mappings"></a> | ||
### Nested Schema for `mappings` | ||
|
||
Required: | ||
|
||
- `iam_role` (String) | ||
|
||
Optional: | ||
|
||
- `org_mrn` (String) | ||
- `space_mrn` (String) |
30 changes: 30 additions & 0 deletions
30
examples/resources/mondoo_querypack_assignment/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
terraform { | ||
required_providers { | ||
mondoo = { | ||
source = "mondoohq/mondoo" | ||
} | ||
} | ||
} | ||
|
||
provider "mondoo" { | ||
region = "us" | ||
} | ||
|
||
resource "mondoo_space" "my_space" { | ||
name = "My Space Name" | ||
org_id = "your-org-1234567" | ||
} | ||
|
||
resource "mondoo_querypack_assignment" "space" { | ||
space_id = mondoo_space.my_space.id | ||
|
||
querypacks = [ | ||
"//policy.api.mondoo.app/policies/mondoo-incident-response-aws", | ||
] | ||
|
||
state = "enabled" # default is enabled, we also support preview and disabled | ||
|
||
depends_on = [ | ||
mondoo_space.my_space | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
terraform { | ||
required_providers { | ||
mondoo = { | ||
source = "mondoohq/mondoo" | ||
} | ||
} | ||
} | ||
|
||
provider "mondoo" { | ||
} | ||
|
||
resource "mondoo_space" "my_space_1" { | ||
name = "My Space 1" | ||
org_id = "your-org-1234567" | ||
} | ||
|
||
resource "mondoo_scim_group_mapping" "MondooAdmin" { | ||
org_id = "your-org-1234567" | ||
group = "MondooAdmin" | ||
mappings = [ | ||
# Give admin group access to the organization | ||
{ | ||
org_mrn : "//captain.api.mondoo.app/organizations/your-org-1234567", | ||
iam_role : "//iam.api.mondoo.app/roles/editor" | ||
}, | ||
# Give admin group access to the space | ||
{ | ||
space_mrn : mondoo_space.my_space_1.mrn, | ||
iam_role : "//iam.api.mondoo.app/roles/viewer" | ||
} | ||
] | ||
|
||
depends_on = [ | ||
mondoo_space.my_space_1 | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.