Skip to content

Commit

Permalink
Add connection configuration documentation (#131)
Browse files Browse the repository at this point in the history
* Add new configuration document for connection abuseipdb (#94)

* Add new configuration document for connection alicloud (#95)

* Add new configuration document for connection azure (#97)

* Add new configuration document for connection bitbucket (#98)

* Add new configuration document for connection clickup (#99)

* Add new configuration document for connection datadog (#100)

* Add new configuration document for connection discord (#101)

* Add new configuration document for connection freshdesk (#102)

* Add new configuration document for connection github (#103)

* Add new configuration document for connection gitlab (#104)

* Add new configuration document for connection ip2locationio (#105)

* Add new configuration document for connection ipstack (#106)

* Add new configuration document for connection jira (#107)

* Add new configuration document for connection jumpcloud (#108)

* Add new configuration document for connection mastodon (#109)

* Add new configuration document for connection microsoft_teams (#110)

* Add new configuration document for connection okta (#111)

* Add new configuration document for connection opsgenie (#112)

* Add new configuration document for connection openai (#113)

* Add new configuration document for connection pagerduty (#114)

* Add new configuration document for connection sendgrid (#115)

* Add new configuration document for connection servicenow (#116)

* Add new configuration document for connection slack (#117)

* Add new configuration document for connection turbot_guardrails (#118)

* Add new configuration document for connection turbot_pipes (#119)

* Add new configuration document for connection uptime_robot (#120)

* Add new configuration document for connection urlscan (#121)

* Add new configuration document for connection vault (#122)

* Add new configuration document for connection virus_total (#123)

* Add new configuration document for connection zendesk (#124)

* Add new configuration document for connection pagerduty (#125)

* Add new configuration document for connection aws (#96)

* Add new configuration document for connection gcp (#128)

* Add new configuration document for connection slack (#127)

* Create Index and Template for connection documents (#129)
  • Loading branch information
omerosaienni authored Sep 18, 2024
1 parent 0039f11 commit ace35dc
Show file tree
Hide file tree
Showing 35 changed files with 1,480 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/reference/config-files/connection/abuseipdb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: abuseipdb
sidebar_label: abuseipdb
---

# abuseipdb

The `abuseipdb` connection can be used to access AbuseIPDB resources.

```hcl
connection "abuseipdb" "abuseipdb_api_key" {
api_key = "bfc6f1c42dfakefdxxxx26977977b2xxxsfake98f310123456789de0d"
}
```

## Arguments

| Name | Type | Required? | Description |
| --------- | ------ | --------- | ----------- |
| `api_key` | String | Optional | API Key |

All arguments are optional, and an `abuseipdb` connection with no arguments will behave the same as the [default connection](#default-connection).

## Default Connection

The `abuseipdb` connection type includes an implicit, default connection (`connection.abuseipdb.default`) that will be configured to set the `api_key` to the `ABUSEIPDB_API_KEY` environment variable.

```hcl
connection "abuseipdb" "default" {
api_key = env("ABUSEIPDB_API_KEY")
}
```
55 changes: 55 additions & 0 deletions docs/reference/config-files/connection/alicloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: alicloud
sidebar_label: alicloud
---

# alicloud

The `alicloud` connection can be used to access Alibaba Cloud resources.

```hcl
connection "alicloud" "alicloud" {
access_key = "LTAI4GBVFakeKey09Kxezv66"
secret_key = "6iNPvThisIsNotARealSecretk1sZF"
}
```

## Arguments

| Name | Type | Required? | Description |
| ------------ | ------ | --------- | ------------------------------------------- |
| `access_key` | String | Optional | A static access key to use to authenticate. |
| `secret_key` | String | Optional | A static secret key to use to authenticate. |

All arguments are optional, and a `alicloud` connection with no arguments will behave the same as the [default connection](#default-connection).

## Default Connection

The `alicloud` connection type includes an implicit, default connection (`connection.alicloud.default`) that will be configured using either of the following environment variables:

1.`ALIBABACLOUD_ACCESS_KEY_ID` and `ALIBABACLOUD_ACCESS_KEY_SECRET`.

```hcl
connection "alicloud" "default" {
access_key = env("ALIBABACLOUD_ACCESS_KEY_ID")
secret_key = env("ALIBABACLOUD_ACCESS_KEY_SECRET")
}
```

2.`ALICLOUD_ACCESS_KEY_ID` and `ALICLOUD_ACCESS_KEY_SECRET`.

```hcl
connection "alicloud" "default" {
access_key = env("ALICLOUD_ACCESS_KEY_ID")
secret_key = env("ALICLOUD_ACCESS_KEY_SECRET")
}
```

3.`ALICLOUD_ACCESS_KEY` and `ALICLOUD_SECRET_KEY`.

```hcl
connection "alicloud" "default" {
access_key = env("ALICLOUD_ACCESS_KEY")
secret_key = env("ALICLOUD_SECRET_KEY")
}
```
78 changes: 78 additions & 0 deletions docs/reference/config-files/connection/aws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: aws
sidebar_label: aws
---

# aws

The `aws` connection can be used to access Amazon Web Services resources.

```hcl
connection "aws" "my_connection" {
profile = "aws-account-01"
}
```

## Arguments

| Name | Type | Required? | Description |
| --------------- | ------ | --------- | -------------------------------------------------------------------------------------------------------------------------- |
| `profile` | String | Optional | The [AWS Profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) to use to obtain connections. |
| `access_key` | String | Optional | A static AWS access key to use to authenticate. |
| `secret_key` | String | Optional | A static AWS secret key to use to authenticate. |
| `session_token` | String | Optional | A static AWS session token to use to authenticate. This is only used if you specify `access_key` and `secret_key`. |
| `ttl` | Number | Optional | The time, in seconds, to cache the connections. By default, the AWS connection will be cached for 5 minutes. |

All arguments are optional, and an `aws` connection with no arguments will behave the same as the [AWS default connection](#default-connection). You may instead specify exactly one of:

- `profile`
- `access_key` and `secret_key` (and optionally `session_token`)

## Attributes (Read-Only)

| Attribute | Type | Description |
| --------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `access_key` | String | The AWS access key to use to authenticate. If you specified the `access_key` arg, then this is the argument value verbatim. If you have specified `profile`, then this is the resolved temporary access key for that profile. |
| `secret_key` | String | The AWS secret key to use to authenticate. If you specified the `secret_key` arg, then this is the argument value verbatim. If you have specified `profile`, then this is the resolved temporary secret key for that profile. |
| `session_token` | String | The AWS session token to use to authenticate. If you specified the `session_token` arg, then this is the argument value verbatim. If you have specified `profile`, then this is the resolved temporary session token for that profile. |
| `env` | Map | A map of the resolved [connection-related environment variables](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_connections_environment.html) (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, `AWS_PROFILE`) |

## Default Connection

The AWS connection type includes an implicit, default connection (`connection.aws.default`) that will be configured using the same mechanism as the AWS CLI (AWS environment variables, default profile, etc); the effective connections of this default are the same as if you run the `aws` command.

## Examples

### Static Connections

```hcl
connection "aws" "aws_static" {
access_key = "ASIAQGDFAKEKGUI5MCEU"
secret_key = "QhLNLGM5MBkXiZm2k2tfake+TduEaCkCdpCSLl6U"
}
```

### AWS Profile

```hcl
connection "aws" "aws_profile" {
profile = "awx_prod_01"
}
```

### Using AWS Connections in Container Step

```hcl
pipeline "ex1" {
param "connection" {
type = string
default = "default"
}
step "container" "aws" {
image = "public.ecr.aws/aws-cli/aws-cli"
cmd = [ "s3", "ls" ]
env = connection.aws[param.connection].env
}
}
```
46 changes: 46 additions & 0 deletions docs/reference/config-files/connection/azure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: azure
sidebar_label: azure
---

# azure

The `azure` connection can be used to access Azure resources.

```hcl
connection "azure" "azure_connection" {
tenant_id = "YourTenantID"
client_secret = "YourClientSecret"
client_id = "YourClientID"
}
```

## Arguments

| Name | Type | Required? | Description |
| --------------- | ------ | --------- | --------------------------------------------------------------------------------------------------------------- |
| `tenant_id` | String | Optional | The Microsoft Entra tenant (directory) ID. |
| `client_id` | String | Optional | The client (application) ID of an App Registration in the tenant |
| `client_secret` | String | Optional | A client secret that was generated for the App Registration. |
| `environment` | String | Optional | The Azure cloud where your resources exist - `AzureCloud` (default), `AzureChinaCloud`, or `AzureUSGovernment`. |

All arguments are optional, and a `azure` connection with no arguments will behave the same as the [default connection](#default-connection).

## Attributes (Read-Only)

| Attribute | Type | Description |
| --------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `env` | Map | A map of the resolved connection-related environment variables (`AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_CLIENT_ID`, `AZURE_ENVIRONMENT`) |

## Default Connection

The `azure` connection type includes an implicit, default connection (`connection.azure.default`) that will be configured using the Azure environment variables:

```hcl
connection "azure" "default" {
tenant_id = env("AZURE_TENANT_ID")
client_secret = env("AZURE_CLIENT_SECRET")
client_id = env("AZURE_CLIENT_ID")
environment = env("AZURE_ENVIRONMENT")
}
```
44 changes: 44 additions & 0 deletions docs/reference/config-files/connection/bitbucket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: bitbucket
sidebar_label: bitbucket
---

# bitbucket

The `bitbucket` connection can be used to access Bitbucket resources.

```hcl
connection "bitbucket" "bb_connection" {
username = "user_name"
password = "P@ss123!"
base_url = "https://api.bitbucket.org/2.0"
}
```

## Arguments

| Name | Type | Required? | Description |
| ---------- | ------ | --------- | --------------------------------- |
| `username` | String | Optional | Bitbucket username |
| `password` | String | Optional | Bitbucket app password |
| `base_url` | String | Optional | Base URL of your Bitbucket Server |

All arguments are optional, and a `bitbucket` connection with no arguments will behave the same as the [default connection](#default-connection).

## Attributes (Read-Only)

| Attribute | Type | Description |
| --------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `env` | Map | A map of the resolved connection-related environment variables (`BITBUCKET_USERNAME`, `BITBUCKET_PASSWORD`, `BITBUCKET_API_BASE_URL`) |

## Default Connection

The `bitbucket` connection type includes an implicit, default connection (`connection.bitbucket.default`) that will be configured using the environment variables `BITBUCKET_USERNAME`, `BITBUCKET_PASSWORD`, and `BITBUCKET_API_BASE_URL`.

```hcl
connection "bitbucket" "default" {
username = env("BITBUCKET_USERNAME")
password = env("BITBUCKET_PASSWORD")
base_url = env("BITBUCKET_API_BASE_URL")
}
```
32 changes: 32 additions & 0 deletions docs/reference/config-files/connection/clickup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: clickup
sidebar_label: clickup
---

# clickup

The `clickup` connection can be used to access ClickUp resources.

```hcl
connection "clickup" "my_clickup" {
token = "pk_616_L5H36X3CXXXXXXXWEAZZF0NM5"
}
```

## Arguments

| Name | Type | Required?| Description
|-----------------|---------|----------|-------------------
| `token` | String | Optional | API token

All arguments are optional, and a `clickup` connection with no arguments will behave the same as the [default connection](#default-connection).

## Default Connection

The `clickup` connection type includes an implicit, default connection (`connection.clickup.default`) that will be configured to set the `token` to the `CLICKUP_TOKEN` environment variable.

```hcl
connection "clickup" "default" {
token = env("CLICKUP_TOKEN")
}
```
37 changes: 37 additions & 0 deletions docs/reference/config-files/connection/datadog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: datadog
sidebar_label: datadog
---

# datadog

The `datadog` connection can be used to access Datadog resources.

```hcl
connection "datadog" "my_datadog_connection" {
api_key = "b1cf234................."
app_key = "1a2345bc..................."
api_url = "https://api.adoghq.com/"
}
```

## Arguments

| Name | Type | Required? | Description |
| --------- | ------ | --------- | --------------- |
| `api_key` | String | Optional | API key |
| `app_key` | String | Optional | Application key |
| `api_url` | String | Optional | API URL |

All arguments are optional, and a `datadog` connection with no arguments will behave the same as the [default connection](#default-connection).

## Default Connection

The `datadog` connection type includes an implicit, default connection (`connection.datadog.default`) that will be configured using the environment variables `DD_CLIENT_API_KEY`, and `DD_CLIENT_APP_KEY`.

```hcl
connection "datadog" "my_datadog_connection" {
api_key = env("DD_CLIENT_API_KEY")
app_key = env("DD_CLIENT_APP_KEY")
}
```
38 changes: 38 additions & 0 deletions docs/reference/config-files/connection/discord.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: discord
sidebar_label: discord
---

# discord

The `discord` connection can be used to access Discord resources.

```hcl
connection "discord" "my_discord" {
token = "00B630jSCGU4Fake5Yh4KQMFakezwE2OgVcS7N999b"
}
```

## Arguments

| Name | Type | Required? | Description |
| ------- | ------ | --------- | ----------- |
| `token` | String | Optional | API token |

All arguments are optional, and a `discord` connection with no arguments will behave the same as the [default connection](#default-connection).

## Attributes (Read-Only)

| Attribute | Type | Description |
| --------- | ---- | -------------------------------------------------------------------------------- |
| `env` | Map | A map of the resolved connection-related environment variables (`DISCORD_TOKEN`) |

## Default Connection

The `discord` connection type includes an implicit, default connection (`connection.discord.default`) that will be configured to set the `token` to the `DISCORD_TOKEN` environment variable.

```hcl
connection "discord" "default" {
token = env("DISCORD_TOKEN")
}
```
Loading

0 comments on commit ace35dc

Please sign in to comment.