# Fastly

![fastly.logo.svg](https://assets.relyanceuat.xyz/images/docs/6031423659661/6030894570893.svg)
Fastly is a cloud computing service provider and content delivery network. It operates a content delivery network (or CDN) and is able to reduce the distance content must travel between the server and the requesting user.

In order to integrate Fastly with Relyance AI you will need an **API Token**.

#### In Fastly:

1. Login to your Fastly account.
2. Navigate to the account menu in the top right hand corner of the screen and select **Account**.
3. From the navigation menu on the left side of the screen, under **Personal Profile** select **Personal API Tokens**.

![Fastly-1.png](https://assets.relyanceuat.xyz/images/docs/6031423659661/6031262614669.png)

![Fastly-2.png](https://assets.relyanceuat.xyz/images/docs/6031423659661/6032502987789.png)

4. On this page, select **+ Create Token**.
5. You may be prompted to enter your password again, do so.
6. On the **Create a Token** page, you will be asked to specify some API options.
Fill in the form with these options:

 i. **Name**: Relyance_AI
 ii. **Service Access**: All Services on **Relyance**
 iii. **Scope**: Read-only access (`global:read`)
 iv. **Expiration**: Never expire
7. Click **Create Token**.
8. This will pop-up a dialog to copy the API key. Copy it to be used in Relyance.

![Fastly-3.png](https://assets.relyanceuat.xyz/images/docs/6031423659661/6032593513613.png)

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **Fastly** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **API Token** into its respective field.

![Fastly-4.png](https://assets.relyanceuat.xyz/images/docs/6031423659661/6101163739533.png)

The **Authentication** step asks for:

- **Personal API Token**: required; held as a secret.

9. Click **Authenticate**.
10. At this point, you should see the following result on the Vendor Integrations page:

![Fastly-5.png](https://assets.relyanceuat.xyz/images/docs/6031423659661/6101170120461.png)

11. Congratulations, you are now connected to **Fastly**.

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "fastly" {
  vendor = "fastly"
  name   = "<your connection name>"

  auth = {
    method = "api-token"
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      personal_api_token = var.fastly_personal_api_token
    }
    secrets_wo_version = 1
  }

  scans = { "property-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
