Skip to content

Latest commit

 

History

History

algolia-v2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Algolia CDK Construct

This construct allows you to create indexes on Algolia inside of the AWS CDK.

Usage

import { AlgoliaIndex } from '@garretcharp/cdk-constructs-algolia-v2'
import { SecretValue } from 'aws-cdk-lib'

const MyIndex = new AlgoliaIndex(this, 'MyIndex', {
	indexName: `${this.stage}-my-index`,
	// See: https://www.algolia.com/doc/api-reference/settings-api-parameters
	settings: {
		searchableAttributes: ['name']
	},
	apiKey: SecretValue.plainText('my-algolia-api-key'),
	appId: 'my-algolia-app-id'
})