Skip to content

Commit

Permalink
Update TF Docs (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipedwards authored Dec 1, 2024
2 parents be6fcc2 + 2f76395 commit 8bfe647
Show file tree
Hide file tree
Showing 48 changed files with 811 additions and 54 deletions.
11 changes: 8 additions & 3 deletions docs/data-sources/kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "komodor_kubernetes Data Source - terraform-provider-komodor"
subcategory: ""
description: |-
Retrieves an existing Komodor Kubernetes cluster integration by name
---

# komodor_kubernetes (Data Source)

Retrieves an existing Komodor Kubernetes cluster integration by name

## Example Usage


```terraform
data "komodor_kubernetes" "data_k8s_cluster" {
cluster_name = "my-cluster"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
11 changes: 8 additions & 3 deletions docs/data-sources/policy.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "komodor_policy Data Source - terraform-provider-komodor"
subcategory: ""
description: |-
Retrieves an existing Komodor Policy by name
---

# komodor_policy (Data Source)

Retrieves an existing Komodor Policy by name

## Example Usage


```terraform
data "komodor_policy" "data_k8s_cluster" {
name = "my-policy"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 9 additions & 4 deletions docs/data-sources/role.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "komodor_role Data Source - terraform-provider-komodor"
subcategory: ""
description: |-
Retrieves an existing Komodor Role by name
---

# komodor_role (Data Source)

Retrieves an existing Komodor Role by name

## Example Usage


```terraform
data "komodor_role" "role" {
name = "my-role"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -24,4 +29,4 @@ description: |-
- `created_at` (String) The date and time of when the Role was created
- `id` (String) The id of the role
- `is_default` (Boolean) Is default role
- `updated_at` (String) The date and time of when the Role was last updated
- `updated_at` (String) The date and time of when the Role was last updated
19 changes: 9 additions & 10 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "komodor Provider"
subcategory: ""
description: |-
The Komodor provider provides lifecycle management of Komodor resources.
---

# komodor Provider
# KOMODOR Provider

The Komodor provider provides lifecycle management of Komodor resources. It provides resources
that allow Kubernetes clusters to be onboarded to the Komodor Platform as well as many other resources
and datasources.

## Example Usage

```terraform
provider "komodor" {
api_key = var.komodor_api_key
}
# See https://github.com/komodorio/terraform-provider-komodor#how-to-use
# for how to get an api key
variable "komodor_api_key" {
type = string
provider "komodor" {
api_key = "KOMODOR_API_KEY"
}
```

Expand Down
44 changes: 42 additions & 2 deletions docs/resources/action.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,56 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "komodor_action Resource - terraform-provider-komodor"
subcategory: ""
description: |-
Creates a new Komodor RBAC action
---

# komodor_action (Resource)

Creates a new Komodor RBAC action

## Example Usage

```terraform
resource "komodor_action" "komo-example-pod-viewer" {
action = "pod-viewer"
description = "View pods"
ruleset = <<EOF
[
{
"apiGroups": [
"apps"
],
"resources": [
"pods"
],
"verbs": [
"get",
"list"
]
}
]
EOF
}
resource "komodor_policy" "komo-example-policy" {
name = "komo-example-policy"
statements = <<EOF
[{
"actions": [
"${komodor_action.komo-example-pod-viewer.action}"
],
"resources": [{
"cluster": "komo-example-cluster",
"namespaces": [
"default",
"kube-system"
]
}]
}]
EOF
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 11 additions & 2 deletions docs/resources/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,30 @@
page_title: "komodor_kubernetes Resource - terraform-provider-komodor"
subcategory: ""
description: |-
Creates a new Komodor integration with a Kubernetes cluster.
This integration allows Komodor to monitor and analyze the cluster's activity.
---

# komodor_kubernetes (Resource)

Creates a new Komodor integration with a Kubernetes cluster.

This integration allows Komodor to monitor and analyze the cluster's activity.

## Example Usage

```terraform
resource "komodor_kubernetes" "k8s_cluster" {
cluster_name = "my-cluster"
}
```

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

### Required

- `cluster_name` (String)
- `cluster_name` (String) The name of the Kubernetes cluster

### Read-Only

Expand Down
99 changes: 97 additions & 2 deletions docs/resources/monitor.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,111 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "komodor_monitor Resource - terraform-provider-komodor"
subcategory: ""
description: |-
Creates a new Komodor monitor which allows Komodor
to monitor, detect, and analyze failures around infrastructure.
---

# komodor_monitor (Resource)

Creates a new Komodor monitor which allows Komodor

to monitor, detect, and analyze failures around infrastructure.

## Example Usage

### Deployment Monitor

```terraform
resource "komodor_monitor" "example-deploy-monitor" {
name = "example-deploy-monitor"
type = "deploy"
active = true
sensors = <<EOF
[{
"cluster": "kind-kind",
"exclude": {
"namespaces": ["komodor"]
},
"namespaces": [
"default"
]
}]
EOF
sinks = <<EOF
{
"slack": [
"default"
],
"teams": [
"default"
],
"pagerduty": [{
"channel": "example-channel",
"integrationKey": "example-pagerduty-integration-key",
"pagerDutyAccountName": "example-pagerduty-account-name"
}]
}
EOF
sinks_options = <<EOF
{
"notifyOn": ["Failure"]
}
EOF
}
```

### Availability Monitor

```terraform
resource "komodor_monitor" "example-availability-monitor" {
name = "example-availability-monitor"
type = "availability"
active = true
sensors = <<EOF
[{
"cluster": "kind-kind",
"exclude": {
"services": ["default/service-to-exclude"]
},
"services": [
"default/service-to-include"
],
"condition": "and",
"namespaces": ["default"]
}]
EOF
sinks = <<EOF
{
"slack": [
"default"
],
"teams": [
"default"
],
"pagerduty": [{
"channel": "example-channel",
"integrationKey": "example-pagerduty-integration-key",
"pagerDutyAccountName": "example-pagerduty-account-name"
}]
}
EOF
variables = <<EOF
{
"categories": [
"*"
],
"duration": 30,
"minAvailable": "100%"
}
EOF
sinks_options = <<EOF
{
"notifyOn": ["*"]
}
EOF
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
Loading

0 comments on commit 8bfe647

Please sign in to comment.