-
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.
- Loading branch information
1 parent
ae11ef3
commit eb84668
Showing
7 changed files
with
395 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,81 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "mondoo_integration_github Resource - terraform-provider-mondoo" | ||
subcategory: "" | ||
description: |- | ||
Continuously scan GitHub organizations and repositories for misconfigurations. | ||
--- | ||
|
||
# mondoo_integration_github (Resource) | ||
|
||
Continuously scan GitHub organizations and repositories for misconfigurations. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "mondoo_org" { | ||
description = "The Mondoo Organization ID" | ||
type = string | ||
} | ||
variable "github_token" { | ||
description = "The GitHub Token" | ||
type = string | ||
} | ||
provider "mondoo" { | ||
region = "us" | ||
} | ||
# Create a new space | ||
resource "mondoo_space" "gh_space" { | ||
name = "My GitHub Space Name" | ||
org_id = var.mondoo_org | ||
} | ||
# Setup the GitHub integration | ||
resource "mondoo_integration_github" "gh_integration" { | ||
space_id = mondoo_space.gh_space.id | ||
name = "GitHub Integration" | ||
owner = "lunalectric" | ||
# define a repository if you want to restrict scan to a single repository | ||
# repository = "repo1" | ||
# alternatively, you can define a list of repositories to allow or deny scanning | ||
# repository_allow_list= ["repo1", "repo2"] | ||
# repository_deny_list = ["repo1", "repo2"] | ||
credentials = { | ||
token = var.github_token | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `credentials` (Attributes) (see [below for nested schema](#nestedatt--credentials)) | ||
- `name` (String) Name of the integration. | ||
- `owner` (String) GitHub Owner. | ||
- `space_id` (String) Mondoo Space Identifier. | ||
|
||
### Optional | ||
|
||
- `repository` (String) GitHub Repository. | ||
- `repository_allow_list` (List of String) List of GitHub repositories to scan. | ||
- `repository_deny_list` (List of String) List of GitHub repositories to exclude from scanning. | ||
|
||
### Read-Only | ||
|
||
- `mrn` (String) Integration identifier | ||
|
||
<a id="nestedatt--credentials"></a> | ||
### Nested Schema for `credentials` | ||
|
||
Required: | ||
|
||
- `token` (String, Sensitive) Token for GitHub integration. |
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,8 @@ | ||
terraform { | ||
required_providers { | ||
mondoo = { | ||
source = "mondoohq/mondoo" | ||
version = ">= 0.4.0" | ||
} | ||
} | ||
} |
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,38 @@ | ||
variable "mondoo_org" { | ||
description = "The Mondoo Organization ID" | ||
type = string | ||
} | ||
|
||
variable "github_token" { | ||
description = "The GitHub Token" | ||
type = string | ||
} | ||
|
||
provider "mondoo" { | ||
region = "us" | ||
} | ||
|
||
# Create a new space | ||
resource "mondoo_space" "gh_space" { | ||
name = "My GitHub Space Name" | ||
org_id = var.mondoo_org | ||
} | ||
|
||
# Setup the GitHub integration | ||
resource "mondoo_integration_github" "gh_integration" { | ||
space_id = mondoo_space.gh_space.id | ||
name = "GitHub Integration" | ||
|
||
owner = "lunalectric" | ||
|
||
# define a repository if you want to restrict scan to a single repository | ||
# repository = "repo1" | ||
|
||
# alternatively, you can define a list of repositories to allow or deny scanning | ||
# repository_allow_list= ["repo1", "repo2"] | ||
# repository_deny_list = ["repo1", "repo2"] | ||
|
||
credentials = { | ||
token = var.github_token | ||
} | ||
} |
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.