Deploy Akamai Integration using Terraform

The recommended way to deploy Fingerprint Akamai proxy integration is to use Terraform.

📘

Before you start: Read the general Akamai guide

This document only covers deploying the Fingerprint Akamai proxy integration using Terraform. It assumes you have already read the general Akamai guide and completed the following steps:

  • Step 1: You have issued a proxy secret in the Fingerprint Dashboard (FPJS_PROXY_SECRET).
  • Step 2: You have defined the path variables for the integration (FPJS_INTEGRATION_PATH, FPJS_AGENT_PATH, FPJS_RESULT_PATH)

If you want to use Akamai Property Manager API instead of Terraform to install the integration, see Install Akamai proxy integration using Akamai Property Manager API.

🚧

Limitations

This integration is exclusively supported for customers on the Enterprise Plan. Other customers are encouraged to use Custom subdomain setup or Cloudflare Proxy Integration.

🚧

Requirements: Terraform setup and latest rule format expected

This guide assumes you use Terraform to manage your site infrastructure on Akamai and that your site uses the latest Akamai rule format. If your Akamai property uses a different rule format or a different deployment method, please contact our support team.

To install the integration, adjust your Terraform configuration to incorporate the variable blocks, property rules, and property variables required by the integration.

Step 3: Add variable blocks to your rules template

🚧

Note: Rules template expected

The following section assumes you are using the Rules template to manage your Akamai property rules. If you are using a plain JSON file instead, reach out to our support team.

Specify three randomized path values and the Fingerprint proxy secret you have created in Step 1:

  • fpjs_integration_path
  • fpjs_agent_path
  • fpjs_result_path
  • fpjs_proxy_secret

For the path values, pick any random strings that are valid URL paths. Be careful not to include words often blocked by ad blockers, such as fingerprint or fpjs. You can use any random value generator or Terraform's Random Provider if you prefer.

Find the akamai_property_rules_template data block in your Terraform configuration file and add the four variables:

data "akamai_property_rules_template" "rules" {
      # Assuming this is property's rules file
      template_file = "/rules/main.json" 
      variables {
        name  = "fpjs_integration_path"
        value = "FPJS_INTEGRATION_PATH"
        type = "string"
      }
      variables {
        name  = "fpjs_agent_path"
        value = "FPJS_AGENT_PATH"
        type = "string"
      }
      variables {
        name  = "fpjs_result_path"
        value = "FPJS_RESULT_PATH"
        type = "string"
      }
      variables {
        name  = "fpjs_proxy_secret"
        value = "FPJS_PROXY_SECRET"
        type = "string"
      }
}

📘

Note: Proxy secret required

Proxied identification requests without a valid proxy secret will result in an authentication error and not receive identification results.

Step 4: Add Fingerprint property rules

  1. Go to the integration's latest releases on GitHub.
  2. Download the terraform/fingerprint-property-rules.json file.
  3. Add it to your Terraform project's rules directory as fingerprint-property-rules.json.
  4. Reference the file in rules/main.json like below:
// rules/main.json
{
  "rules": {
    "name": "default",
    "behaviors": [
      // ...
    ],
    "children": [
      // ...other rule files 
      // Add the downloaded rules file 
      "#include:fingerprint-property-rules.json" 
    ],
    // ...
  }
}

Step 5: Add Fingerprint property variables

  1. Go to the integration's latest releases on GitHub.
  2. Download the terraform/fingerprint-property-variables.json file.
  3. Add it to your Terraform project's rules directory as fingerprint-property-variables.json.
  4. Reference the file in rules/main.json:
  • If you don't have a variables field, add the variables: "#include:fingerprint-property-variables.json" line.
  • If you already have a variables field, merge fingerprint-property-variables.json with your existing variables file.
// rules/main.json
{
  "rules": {
    "name": "default",
    "behaviors": [
      // ...
    ],
    "children": [
      //...
      "#include:fingerprint-property-rules.json" 
    ],
    // Add the downloaded variables file (or merge it with existing variables file)
    "variables": "#include:fingerprint-property-variables.json"
    // ...
  }
}

📘

Property variables vs Terraform variable blocks

Note that the Akamai property variables added in Step 5 are different from the Terraform variable blocks added in Step 3.

  • Property variables are used by property rules and you cannot change them.
  • You can change the variable block values (randomized paths and the proxy secret) according to your needs.

Step 6: Apply Terraform changes

  1. Run terraform plan to review your changes.
  2. Run terraform apply.

After your property deploys, you can access Fingerprint CDN and API through the chosen paths on your website.

Step 7: Configure the client agent

Please see the main Akamai proxy integration guide to Configure the client agent on your website or mobile application.