Skip to content

Commit

Permalink
Enhance documentation (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Viorel Dodin <[email protected]>
  • Loading branch information
DodinViorel committed Apr 29, 2024
1 parent abcd547 commit d5792a7
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/data-sources/type.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-

Type data source

Enables you to read any type of Cisco Observability Platform. Types are just schemas for the objects.
Type name is the field required to get the type data source.

## Example usage
In this example we want to fetch a type called fmm:namespace.

```terraform
data "observability_type" "ns" {
type_name = "fmm:namespace"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
41 changes: 40 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,50 @@ description: |-
---

# observability Provider
# Observability Provider

Terraform Observability provider enables users to provision objects as resources and read types as data sources

## Authentication

To start using the Observability Terraform Provider you need to authenticate with the Cisco Observability Platform.

You can do this by either using service-principal or oauth as an authentication method:


```terraform
terraform {
required_providers {
observability = {
source = "registry.terraform.io/cisco-open/observability"
}
}
}
provider "observability" {
tenant = "<your cisco observability account>"
auth_method = "service-principal"
url = "https://<your environment/host>"
secrets_file = "<path to your secrets file>"
}
```

```terraform
terraform {
required_providers {
observability = {
source = "registry.terraform.io/cisco-open/observability"
}
}
}
provider "observability" {
tenant = "<your cisco observability account>"
auth_method = "oauth"
url = "https://<your environment/host>"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
21 changes: 20 additions & 1 deletion docs/resources/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,26 @@ description: |-

Object resource


Enables you to create and manage any object of Cisco Observability Platform. Objects are actual populated values of a type. Data is a field which acts like a container for any object payload.

## Example usage

```terraform
resource "observability_object" "conn" {
type_name = "<your type>"
object_id = "<object id of the object>"
layer_type = "TENANT"
layer_id = "<your tenant>"
import_id = "<object type>|<object id>|TENANT|<your tenant>"
data = jsonencode(
{
"field1" : "value1",
"field2" : "value2",
...
}
)
}
```

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

0 comments on commit d5792a7

Please sign in to comment.