Skip to content

Commit

Permalink
docs changes (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
pulkitshunyeka authored Aug 22, 2023
1 parent beb47d3 commit 2e61213
Show file tree
Hide file tree
Showing 19 changed files with 317 additions and 256 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# terraform-provider-autobotai
Terraform provider for autobotAI (https://autobot.live)
# Documentation

- [terraform-provider-autobotAI](https://registry.terraform.io/providers/shunyeka-spl/autobotai/latest/docs)
76 changes: 76 additions & 0 deletions docs/autobotAI_provider_guidance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Guidance on utilizing autobotAI Integrations, Bot Building Blocks, and Inventory functionalities.

1. To harness the capabilities of autobotAI Integrations, Bot Building Blocks, and Inventory, follow these steps:

- Incorporate the API Key and URL into the variable.tf file.
- Inside the relevant folders—such as example/integrations/(aws,azure,gcp,git,ms_teams,conformity,workload_security) or example/bot_building_block/(automation,evaluator,fetcher,listener) or example/inventory/(inventory_schedule)—create a variable.tf file. Include the following contents:

```hcl
variable "apikey" {
type = string
default = "API Key"
}
variable "url" {
type = string
default = "url"
}
```
- Configure the essential providers and credentials by creating a provider.tf file. Here's an example setup:

```hcl
terraform {
required_providers {
autobotai = {
source = "shunyeka-spl/autobotai"
}
}
}

provider "autobotai" {
apikey = var.apikey
url = var.url
}
```
- Keep in mind that you can modify the declared values based on your preferences.
2. Execute Terraform operations:
- Navigate to the project directory:
```
cd /path/terraform-provider-autobotai
```
- Generate the artifact:

```
make install
```
- Run the Terraform code by moving to the appropriate folder—either example/integrations/, example/bot_building_block/, or example/inventory/:

```
cd example/integrations/(aws,azure,gcp,git,ms_teams,conformity,workload_security)
terraform init
terraform apply
```

OR

```
cd example/bot_building_block/(automation,evaluator,fetcher,listener)
terraform init
terraform apply
```

OR

```
cd example/inventory/(inventory_schedule)
terraform init
terraform apply

```





23 changes: 11 additions & 12 deletions docs/bot_building_block/resource_automation.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# Instruction for how to create an Automation

# Guidance on Creating an Automation
---
page_title: "autobotai_automation"
description: |-
Provides to create an autobotAI Automation
page_title: "autobotai_automation"
description: Enables the creation of an autobotAI Automation.
---

# Resource `autobotai_automation`
Provides to create an autobotAI Automation
## Resource `autobotai_automation`
Discover how to set up an autobotAI Automation


## Required things
## Prerequisites
1. apikey and url
2. name, clients,code,title,type,integration_type,approval_required

## Steps
1. Create terraform "main.tf" inside "example/bot_building_block/automation" folder for autobotAI Automation, create the file if not exists and add the following values:
1. Begin by crafting a file named "main.tf" within the "example/bot_building_block/automation" folder. If this file isn't present, create it and input the subsequent content:
## Example Usage
```
resource "autobotai_automation" "automation" {
name = "testing-pulkit-testing-pulkit-bhagwate"
clients = ["NetworkManagementClient","NetworkManagementClient"]
name = "testing"
clients = ["NetworkManagementClient"]
code= "#code"
title ="testing"
type="communication"
Expand All @@ -28,4 +27,4 @@ Provides to create an autobotAI Automation
}
```
2. To use the autobotAI Automation follow the "index.md"
2. For implementing autobotAI Automation, refer to the instructions provided in the[autobotAI-Provider-Guidance](../autobotAI_provider_guidance.md) document.
19 changes: 9 additions & 10 deletions docs/bot_building_block/resource_bot.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Instruction for how to create a Bot
# Guidance on Creating a Bot

---
page_title: "autobotai_bot"
description: |-
Provides to create an autobotAI Bot
page_title: "autobotai_bot"
description: Enables the creation of an autobotAI Bot
---

# Resource `autobotai_bot`
Provides to create an autobotAI Bot
## Resource `autobotai_bot`
Discover how to set up an autobotAI Bot

## Required things
## Prerequisites
1. apikey and url
2. name,topic,category,importance,fetcher_id,integration_id,integration_type,actions{type,automation_id,params{description,name,type,values},rer\quired,action_id}evaluator_id(you can pass the id from evaluator)


## Steps
1. Create terraform "main.tf" inside "example/bot_building_block/evaluator" folder for autobotAI Bot, create the file if not exists and add the following values:
1. Create a "main.tf" Terraform file within the "example/bot_building_block/evaluator" directory for autobotAI Bot. If the file doesn't exist, create it, and input the following values:

2. Note - you need to add the bot resource after the evaluator resource in evaluator/main.tf
2. Notably, ensure you place the bot resource after the evaluator resource in the "evaluator/main.tf" file.

## Example Usage
```
Expand Down Expand Up @@ -45,4 +44,4 @@ Provides to create an autobotAI Bot
}
```
3. To use the autobotAI Bot follow the "index.md"
3. For implementing autobotAI Bot, refer to the instructions provided in the [autobotAI-Provider-Guidance](../autobotAI_provider_guidance.md) document.
21 changes: 10 additions & 11 deletions docs/bot_building_block/resource_evaluator.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Instruction for how to create a Evaluator
# Guidance on Creating an Evaluator

---
page_title: "autobotai_evaluator"
description: |-
Provides to create an autobotAI Evaluator
page_title: "autobotai_evaluator"
description: Enables the creation of an autobotAI Evaluator.
---

# Resource `autobotai_evaluator`
Provides to create an autobotAI Evaluator
## Resource `autobotai_evaluator`
Discover how to set up an autobotAI Evaluator

## Required things
## Prerequisites
1. apikey and url
2. name, id(qb_rules), rules{id(rule_id),field,operator,value,value_score}, combinator,not,preference
Note - you can define multiple rules

## Steps
1. Create terraform "main.tf" inside "example/bot_building_block/evaluator" folder for autobotAI Evaluator, create the file if not exists and add the following values:
1. To create an autobotAI Evaluator, generate a "main.tf" Terraform file within the "example/bot_building_block/evaluator" directory. If the file doesn't exist, generate it and input the subsequent values:
## Example Usage
```
resource "autobotai_evaluator" "evaluator" {
Expand Down Expand Up @@ -54,7 +53,7 @@ Note - you can define multiple rules
}
```
# After the evaluator is created you need to create a bot
# Instruction for how to create a Bot -> follow "resource_bot.md"
- After the evaluator is created, you'll need to create a bot.
- Refer to the guidance provided in the [Bot-Creation](resource_bot.md) document for step-by-step instructions on how to create a Bot.

2. To use the autobotAI Evaluator follow the "index.md"
2. For implementing autobotAI Evaluator, refer to the instructions provided in the [autobotAI-Provider-Guidance](../autobotAI_provider_guidance.md) document.
17 changes: 8 additions & 9 deletions docs/bot_building_block/resource_fetcher.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Instruction for how to create a Fetcher
# Guidance on Creating a Fetcher

---
page_title: "autobotai_fetcher"
description: |-
Provides to create an autobotAI Fetcher
page_title: "autobotai_fetcher"
description: Enables the creation of an autobotAI Fetcher.
---

# Resource `autobotai_fetcher`
Provides to create an autobotAI Fetcher
## Resource `autobotai_fetcher`
Discover how to set up an autobotAI Fetcher

## Required things
## Prerequisites
1. apikey and url
2. name, clients,code,integration_type

## Steps
1. Create terraform "main.tf" inside "example/bot_building_block/fetcher" folder for autobotAI Fetcher, create the file if not exists and add the following values:
1. Generate a Terraform file named "main.tf" within the "example/bot_building_block/fetcher" directory to create an autobotAI Fetcher. If the file does not exist, create it, and include the following content:
## Example Usage
```
resource "autobotai_fetcher" "fetcher" {
Expand All @@ -25,4 +24,4 @@ description: |-
}
```
2. To use the autobotAI Fetcher follow the "index.md"
2. For implementing autobotAI fetcher, refer to the instructions provided in the [autobotAI-Provider-Guidance](../autobotAI_provider_guidance.md) document.
17 changes: 8 additions & 9 deletions docs/bot_building_block/resource_listener.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Instruction for how to create a Listener
# Guidance on Creating a Listener

---
page_title: "autobotai_listener"
description: |-
Provides to create an autobotAI Listener
page_title: "autobotai_listener"
description: Enables the creation of an autobotAI Listener
---

# Resource `autobotai_listener`
Provides to create an autobotAI Listener
## Resource `autobotai_listener`
Discover how to set up an autobotAI Fetcher

## Required things
## Prerequisites
1. apikey and url
2. description, webhook_source_integration_type,name

## Steps
1. Create terraform "main.tf" inside "example/bot_building_block/listener" folder for autobotAI Listener, create the file if not exists and add the following values:
1. Craft a Terraform file named "main.tf" within the "example/bot_building_block/listener" directory to establish an autobotAI Listener. If the file does not already exist, create it and incorporate the subsequent values:
## Example Usage
```
resource "autobotai_listener" "listener" {
Expand All @@ -24,4 +23,4 @@ description: |-
}
```
2. To use the autobotAI Fetcher follow the "index.md"
2. For implementing autobotAI Listener, refer to the instructions provided in the [autobotAI-Provider-Guidance](../autobotAI_provider_guidance.md) document.
Loading

0 comments on commit 2e61213

Please sign in to comment.