A collection of ready-to-use Akamai Terraform Provider examples covering a wide range of products and use-cases. Each example can be run independently and is intended to help you get started quickly.
Looking for production-ready templates? Visit terraform-templates for fully automated, multi-environment templates with deployment pipelines.
Want to export existing config? Use the Akamai CLI for Terraform to export your Akamai Control Center configuration to HCL.
- Terraform >= 1.9.0
- Akamai Terraform Provider ~> 10.0
- Akamai API credentials
products/ # Standalone examples, one per Akamai product
snippets/ # Reusable HCL code fragments
tools/ # Helper scripts (authentication, import conversion)
workflows/ # CI/CD workflow examples (GitHub Actions, multi-pipeline, PowerShell)
| Directory | Description |
|---|---|
products/aap/ |
App & API Protector (AAP) |
products/aapasm/ |
App & API Protector with Advanced Security Module (AAPASM) |
products/api-definitions/api/ |
API Definitions lifecycle using a raw JSON descriptor |
products/api-definitions/openapi/ |
API Definitions lifecycle from an OpenAPI 3.0 spec |
products/certificates/cloud-certificates/ |
Cloud Certificate Manager (CCM) workflow |
products/certificates/cps-domain-validation/ |
CPS DV certificate provisioning |
products/certificates/cps-domain-validation-simple/ |
Simplified CPS DV certificate provisioning |
products/certificates/cps-third-party/ |
CPS third-party certificate provisioning |
products/certificates/default-dv/ |
Default DV certificate |
products/client-lists/ |
Best-practice Client Lists for Application Security (IP/Geo block, bypass lists, etc.) |
products/cloudlets/edge-redirector-non-shared-csv/ |
Edge Redirector Cloudlet (non-shared, CSV rules) |
products/cloudlets/edge-redirector-shared-mult-envs/ |
Edge Redirector Cloudlet (shared policy, multiple environments) |
products/cloudlets/phased-release-shared/ |
Phased Release Cloudlet with a shared policy |
products/datastream/ |
DataStream 2 — creates a stream with all available datasets |
products/domain-ownership/late-validation/ |
Domain ownership validation (late) |
products/domain-ownership/pre-validation/ |
Domain ownership validation (pre) |
products/edgedns/ |
EdgeDNS zone and record management |
products/edgekv/ |
EdgeKV namespace, groups and items |
products/edgeworker/ |
EdgeWorkers — bundle creation, deployment and activation |
products/gtm/ |
Global Traffic Management domain with datacenters and load-balanced properties |
products/ivm/ivm-images/ |
Image & Video Manager — image policies |
products/ivm/ivm-videos/ |
Image & Video Manager — video policies |
products/mtls/edge-truststore/ |
mTLS edge truststore (CPS + PAPI integration) |
products/mtls/origin-keystore/ |
mTLS origin keystore |
products/network-lists/ |
Network Lists module |
products/property/bulk-creation/ |
Property Manager bulk property creation |
products/property/hostname-buckets/ |
Property Manager hostname buckets |
products/property/pm-includes/ |
Property Manager includes |
products/property/rules-as-hcl/ |
Property Manager rules written directly in HCL |
products/property/rules-as-jsonnet/ |
Property Manager rules written in Jsonnet |
products/property/rules-as-snippets/ |
Property Manager rules split into JSON snippets |
products/property/saas-provider/ |
Property Manager SaaS provider pattern |
Reusable, standalone HCL fragments in snippets/ that can be dropped into any configuration:
| File | Description |
|---|---|
authentication-options.tf |
Common Akamai provider authentication patterns |
dynamic-origins-rule.tf |
Dynamic origins in a Property Manager rule |
dynamic-property-hostnames.tf |
Dynamic property hostname generation |
obtain-and-reference-bot-ids.tf |
Look up and reference Bot Manager IDs |
obtain-sbd-validations.tf |
Obtain SBD (Secure By Default) validations |
preconditions-are-useful.tf |
Using Terraform preconditions for input validation |
| Directory | Description |
|---|---|
tools/authentication/ |
Bash and PowerShell scripts to load Akamai API credentials from ~/.edgerc into Terraform environment variables for local testing |
tools/import-converter/ |
Python script to convert the import.sh generated by the Akamai Terraform CLI into inline Terraform import blocks (compatible with Terraform Cloud and other platforms that lack shell access) |
| Directory | Description |
|---|---|
workflows/github-workflow/ |
GitHub Actions workflow that runs Terraform to manage a Property Manager configuration across multiple environments, with remote state stored in Linode Object Storage |
workflows/multi-pipeline/ |
Multi-environment pipeline pattern — same module source, environment-specific .tfvars, sequentially deployed through dev → qa → stage → prod |
workflows/external_pwsh/ |
Use Akamai PowerShell module as an external data source to call any Akamai API not yet covered by the Terraform provider |
-
Set up credentials — configure your
~/.edgercfile with your Akamai API credentials, then optionally use the helper scripts intools/authentication/to export them as environment variables. -
Pick an example — browse the tables above and navigate to the relevant directory.
-
Initialise and apply:
cd products/<example> cp example.tfvars terraform.tfvars # edit values to match your account terraform init terraform plan terraform apply
See CONTRIBUTING.md for guidelines on how to contribute, including the pre-commit setup (terraform-docs and terraform fmt) and the semantic PR conventions used for changelog generation.