Hey guys, does anyone know how to do an ElasticSea...
# help
j
Hey guys, does anyone know how to do an ElasticSearch (OpenSearch) destination for Firehose using the L2 Constructs? They seem to have removed it. Or if not, any ideas on how to use the L1 constructs while using CDKv2?
f
Hey @justindra, yeah I can confirm ElasticSearch destinations are not support with the L2 constructs.
j
Thanks @Frank! Do you know if it's possible to use the L1 constructs after upgrading to v2 and if so, how would I go about doing that? I couldn't find any examples for this
f
Yeah definitely possible. If you can find an example of how to do that in CloudFormation, it’d be pretty straight forward to convert that into L1 constructs.
For example, you can get L1 from L2 like this:
Copy code
// Create an L2 Firehose delivery stream
const firehose = new firehose.DeliveryStream(...);

// Create an L2 ElasticSearch domain
const domain = new es.Domain(...);

// You can get the L1 constructs like this
firehose.node.defaultChild
domain.node.defaultChild
This is essentially how the L2 S3 destination was implemented.
j
Cool! Thanks for that! I'll give it a go when I get a chance. Hopefully can upgrade this project to v2!
@Frank thanks again for the advice! That seems to have worked!