|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "mondoo_integration_github Resource - terraform-provider-mondoo" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Continuously scan GitHub organizations and repositories for misconfigurations. |
| 7 | +--- |
| 8 | + |
| 9 | +# mondoo_integration_github (Resource) |
| 10 | + |
| 11 | +Continuously scan GitHub organizations and repositories for misconfigurations. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +variable "mondoo_org" { |
| 17 | + description = "The Mondoo Organization ID" |
| 18 | + type = string |
| 19 | +} |
| 20 | +
|
| 21 | +variable "github_token" { |
| 22 | + description = "The GitHub Token" |
| 23 | + type = string |
| 24 | +} |
| 25 | +
|
| 26 | +provider "mondoo" { |
| 27 | + region = "us" |
| 28 | +} |
| 29 | +
|
| 30 | +# Create a new space |
| 31 | +resource "mondoo_space" "gh_space" { |
| 32 | + name = "My GitHub Space Name" |
| 33 | + org_id = var.mondoo_org |
| 34 | +} |
| 35 | +
|
| 36 | +# Setup the GitHub integration |
| 37 | +resource "mondoo_integration_github" "gh_integration" { |
| 38 | + space_id = mondoo_space.gh_space.id |
| 39 | + name = "GitHub Integration" |
| 40 | +
|
| 41 | + owner = "lunalectric" |
| 42 | +
|
| 43 | + # define a repository if you want to restrict scan to a single repository |
| 44 | + # repository = "repo1" |
| 45 | +
|
| 46 | + # alternatively, you can define a list of repositories to allow or deny scanning |
| 47 | + # repository_allow_list= ["repo1", "repo2"] |
| 48 | + # repository_deny_list = ["repo1", "repo2"] |
| 49 | +
|
| 50 | + credentials = { |
| 51 | + token = var.github_token |
| 52 | + } |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +<!-- schema generated by tfplugindocs --> |
| 57 | +## Schema |
| 58 | + |
| 59 | +### Required |
| 60 | + |
| 61 | +- `credentials` (Attributes) (see [below for nested schema](#nestedatt--credentials)) |
| 62 | +- `name` (String) Name of the integration. |
| 63 | +- `owner` (String) GitHub Owner. |
| 64 | +- `space_id` (String) Mondoo Space Identifier. |
| 65 | + |
| 66 | +### Optional |
| 67 | + |
| 68 | +- `repository` (String) GitHub Repository. |
| 69 | +- `repository_allow_list` (List of String) List of GitHub repositories to scan. |
| 70 | +- `repository_deny_list` (List of String) List of GitHub repositories to exclude from scanning. |
| 71 | + |
| 72 | +### Read-Only |
| 73 | + |
| 74 | +- `mrn` (String) Integration identifier |
| 75 | + |
| 76 | +<a id="nestedatt--credentials"></a> |
| 77 | +### Nested Schema for `credentials` |
| 78 | + |
| 79 | +Required: |
| 80 | + |
| 81 | +- `token` (String, Sensitive) Token for GitHub integration. |
0 commit comments