Skip to content

Commit

Permalink
Add new configuration document for connection sendgrid (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerosaienni authored Sep 10, 2024
1 parent c6bc61b commit 2f81898
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/reference/config-files/connection/sendgrid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: sendgrid
sidebar_label: sendgrid
---

# sendgrid

The `sendgrid` connection can be used to access SendGrid resources.

```hcl
connection "sendgrid" "my_sendgrid" {
api_key = "SG.R7..."
}
```

## Arguments

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

All arguments are optional, and a `sendgrid` 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 (`SENDGRID_API_KEY`) |

## Default Connection

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

```hcl
connection "sendgrid" "default" {
api_key = env("SENDGRID_API_KEY")
}
```

0 comments on commit 2f81898

Please sign in to comment.