Skip to content

Commit

Permalink
feat added gitlab integration
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Theuermann <[email protected]>
  • Loading branch information
mati007thm committed Dec 3, 2024
1 parent 247eea5 commit 3c5ae23
Show file tree
Hide file tree
Showing 5 changed files with 410 additions and 0 deletions.
82 changes: 82 additions & 0 deletions docs/resources/integration_gitlab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "mondoo_integration_gitlab Resource - terraform-provider-mondoo"
subcategory: ""
description: |-
Continuously scan GitLab for misconfigurations.
---

# mondoo_integration_gitlab (Resource)

Continuously scan GitLab for misconfigurations.

## Example Usage

```terraform
variable "gitlab_token" {
description = "The GitLab Token"
type = string
sensitive = true
}
provider "mondoo" {
space = "hungry-poet-123456"
}
# Setup the GitLab integration
resource "mondoo_integration_gitlab" "gitlab_integration" {
name = "GitLab Integration"
# base_url = "" # optional, otherwise gitlab.com
# group = "" # optional, otherwise all groups are discovered
# configure discovery options
discovery = {
groups = true
projects = true
terraform = true
k8s_manifests = true
}
credentials = {
token = var.gitlab_token
}
}
```

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

### Required

- `credentials` (Attributes) (see [below for nested schema](#nestedatt--credentials))
- `name` (String) Name of the integration.

### Optional

- `base_url` (String) Base URL of the GitLab instance (only set this if your instance is self-hosted).
- `discovery` (Attributes) (see [below for nested schema](#nestedatt--discovery))
- `group` (String) Group to assign the integration to.
- `space_id` (String) Mondoo Space Identifier. If it is not provided, the provider space is used.

### Read-Only

- `mrn` (String) Integration identifier

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

Required:

- `token` (String, Sensitive) Token for GitLab integration.


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

Optional:

- `groups` (Boolean) Enable discovery of GitLab groups.
- `k8s_manifests` (Boolean) Enable discovery of Kubernetes manifests.
- `projects` (Boolean) Enable discovery of GitLab projects.
- `terraform` (Boolean) Enable discovery of Terraform configurations.
8 changes: 8 additions & 0 deletions examples/resources/mondoo_integration_gitlab/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
mondoo = {
source = "mondoohq/mondoo"
version = ">= 0.19"
}
}
}
29 changes: 29 additions & 0 deletions examples/resources/mondoo_integration_gitlab/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
variable "gitlab_token" {
description = "The GitLab Token"
type = string
sensitive = true
}

provider "mondoo" {
space = "hungry-poet-123456"
}

# Setup the GitLab integration
resource "mondoo_integration_gitlab" "gitlab_integration" {
name = "GitLab Integration"

# base_url = "" # optional, otherwise gitlab.com
# group = "" # optional, otherwise all groups are discovered

# configure discovery options
discovery = {
groups = true
projects = true
terraform = true
k8s_manifests = true
}

credentials = {
token = var.gitlab_token
}
}
Loading

0 comments on commit 3c5ae23

Please sign in to comment.