Talked about this a long time ago but finally got ...
# random
g
Talked about this a long time ago but finally got around to making an open source version of creating Algolia indexes from the CDK if anyone is interested. CDK Version 1: https://www.npmjs.com/package/@garretcharp/cdk-constructs-algolia CDK Version 2: https://www.npmjs.com/package/@garretcharp/cdk-constructs-algolia-v2 Usage:
Copy code
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'
})
If you run into any issues let me know šŸ™‚ Source code: https://github.com/garretcharp/cdk-constructs
a
Good job sir.