Home

Awesome

terraform-provider-algolia

MIT licensed CircleCI

A Terraform provider for Algolia.

Only supports creating, updating and deleting API keys for now. It might be extended with support for other resources in the future.

Pre-built binaries for macOS and Linux can downloaded from the releases page.

Requires at least Go 1.12

Installation

Usage

Provider configuration

algolia

provider "algolia" {
    version = "~> 0.3"

    application_id = "algolia app id"
    api_key = "algolia admin api key"
}
Argument Reference

The following arguments are supported:

Data Source Configuration

algolia_api_key

data "algolia_api_key" "test" {
    id = "the_key_value"
} 
Argument Reference

The following arguments are supported:

Resources Configuration

algolia_api_key

Example usage
resource "algolia_api_key" "test" {
    indexes = ["my-index-*"]

    acl = ["search"]

    description = "my api key name"

    validity = 0

    max_queries_per_ip_per_hour = 0

    max_hits_per_query = 0
}

output "my_new_api_key" {
    value = algolia_api_key.test.key
}
Argument reference

The following arguments are supported:

Import

The keys can be imported using the key value itself:

terraform import algolia_key.test "the_key_value"