0

I want to create managed MongoDb using DocumentDb on AWS via terraform.

I created a DocumentDb Elastic cluster via the UI, and it seems to work fine. Now I want to create this cluster via terraform, and I don't find documentation for it.

I read that only the documentDb's 'Elastic Cluster' support MongoDb Sharding APIs (and not the 'Instance Based Cluster').

This is the Hashicorp doc for DocumentDb, but I don't see reference for Elastic cluster.

Yagel
  • 1,184
  • 2
  • 18
  • 41

1 Answers1

1

DocumentDB is relatively new. I think it's not possible to do it on terraform yet.

You can do it using Cloudformation

Using AWS CDK

Or AWS CLI

I think it will be available soon, if it is possible with other IaC Terraform don't take too long to update.

  • 1
    Support to elastic clusters has been added in 4.63.0. See [pull request](https://github.com/hashicorp/terraform-provider-aws/pull/30666). – emyller Apr 27 '23 at 21:43