Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Theuermann <[email protected]>
  • Loading branch information
mati007thm committed Jul 17, 2024
1 parent 9b536ef commit d9a147c
Show file tree
Hide file tree
Showing 18 changed files with 384 additions and 146 deletions.
75 changes: 0 additions & 75 deletions docs/data-sources/compliance_framework.md

This file was deleted.

74 changes: 74 additions & 0 deletions docs/data-sources/frameworks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mondoo_frameworks Data Source - terraform-provider-mondoo"
subcategory: ""
description: |-
Data source to return compliance frameworks in a Space
---

# mondoo_frameworks (Data Source)

Data source to return compliance frameworks in a Space

## Example Usage

```terraform
data "mondoo_frameworks" "frameworks_data" {
space_id = "your-space-1234567"
}
output "framework_mrn" {
value = [for framework in data.mondoo_frameworks.frameworks_data.frameworks : framework.mrn]
description = "The MRN of the frameworks in the space."
}
```

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

### Optional

- `space_id` (String) Space ID
- `space_mrn` (String) Space MRN

### Read-Only

- `frameworks` (Attributes List) List of compliance frameworks (see [below for nested schema](#nestedatt--frameworks))

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

Read-Only:

- `authors` (Attributes List) List of authors (see [below for nested schema](#nestedatt--frameworks--authors))
- `mrn` (String) Compliance framework MRN
- `name` (String) Compliance framework name
- `previous_completion_scores` (Attributes List) List of previous completion scores (see [below for nested schema](#nestedatt--frameworks--previous_completion_scores))
- `state` (String) Compliance framework state is either `PREVIEW` or `ACTIVE`
- `tags` (Attributes List) List of tags (see [below for nested schema](#nestedatt--frameworks--tags))

<a id="nestedatt--frameworks--authors"></a>
### Nested Schema for `frameworks.authors`

Read-Only:

- `email` (String) Author email
- `name` (String) Author name


<a id="nestedatt--frameworks--previous_completion_scores"></a>
### Nested Schema for `frameworks.previous_completion_scores`

Read-Only:

- `score` (Number) Score
- `timestamp` (String) Timestamp


<a id="nestedatt--frameworks--tags"></a>
### Nested Schema for `frameworks.tags`

Read-Only:

- `key` (String) Tag key
- `value` (String) Tag value
8 changes: 4 additions & 4 deletions docs/data-sources/policy.md → docs/data-sources/policies.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mondoo_policy Data Source - terraform-provider-mondoo"
page_title: "mondoo_policies Data Source - terraform-provider-mondoo"
subcategory: ""
description: |-
Data source for policies and querypacks
---

# mondoo_policy (Data Source)
# mondoo_policies (Data Source)

Data source for policies and querypacks

## Example Usage

```terraform
data "mondoo_policy" "policy" {
data "mondoo_policies" "policies_data" {
space_id = "your-space-1234567"
catalog_type = "ALL" # available options: "ALL", "POLICY", "QUERYPACK"
assigned_only = true
}
output "policies_mrn" {
value = [for policy in data.mondoo_policy.policy.policies : policy.policy_mrn]
value = [for policy in data.mondoo_policies.policies_data.policies : policy.policy_mrn]
description = "The MRN of the policies in the space according to the filter criteria."
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/custom_framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "mondoo_space" "my_space" {
org_id = var.mondoo_org
}
resource "mondoo_custom_framework" "compliance_framework_example" {
resource "mondoo_custom_framework" "custom_framework" {
space_id = mondoo_space.my_space.id
data_url = var.my_custom_framework
}
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/framework_assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "mondoo_space" "my_space" {
org_id = var.mondoo_org
}
resource "mondoo_framework_assignment" "compliance_framework_example" {
resource "mondoo_framework_assignment" "framework_assignment" {
space_id = mondoo_space.my_space.id
framework_mrn = ["//policy.api.mondoo.app/frameworks/cis-controls-8",
"//policy.api.mondoo.app/frameworks/iso-27001-2022"]
Expand Down

This file was deleted.

8 changes: 8 additions & 0 deletions examples/data-sources/mondoo_frameworks/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
data "mondoo_frameworks" "frameworks_data" {
space_id = "your-space-1234567"
}

output "framework_mrn" {
value = [for framework in data.mondoo_frameworks.frameworks_data.frameworks : framework.mrn]
description = "The MRN of the frameworks in the space."
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
data "mondoo_policy" "policy" {
data "mondoo_policies" "policies_data" {
space_id = "your-space-1234567"
catalog_type = "ALL" # available options: "ALL", "POLICY", "QUERYPACK"
assigned_only = true
}

output "policies_mrn" {
value = [for policy in data.mondoo_policy.policy.policies : policy.policy_mrn]
value = [for policy in data.mondoo_policies.policies_data.policies : policy.policy_mrn]
description = "The MRN of the policies in the space according to the filter criteria."
}
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/resources/mondoo_custom_framework/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "mondoo_space" "my_space" {
org_id = var.mondoo_org
}

resource "mondoo_custom_framework" "compliance_framework_example" {
resource "mondoo_custom_framework" "custom_framework" {
space_id = mondoo_space.my_space.id
data_url = var.my_custom_framework
}
2 changes: 1 addition & 1 deletion examples/resources/mondoo_framework_assignment/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "mondoo_space" "my_space" {
org_id = var.mondoo_org
}

resource "mondoo_framework_assignment" "compliance_framework_example" {
resource "mondoo_framework_assignment" "framework_assignment" {
space_id = mondoo_space.my_space.id
framework_mrn = ["//policy.api.mondoo.app/frameworks/cis-controls-8",
"//policy.api.mondoo.app/frameworks/iso-27001-2022"]
Expand Down
Loading

0 comments on commit d9a147c

Please sign in to comment.