Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added gitlab integration #167

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
mati007thm marked this conversation as resolved.
Show resolved Hide resolved

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

credentials = {
token = var.gitlab_token
}
}
Loading
Loading