AnnouncementIntroducing MongoDB 8.0, the fastest MongoDB ever! Read more >
NEWSLearn why MongoDB was named a leader in the 2024 Gartner® Magic Quadrant™ Read the blog >
AnnouncementIntroducing Search Demo Builder, the newest addition to the Atlas Search Playground Learn more >
WEBINARFeb. 6, 2025 11 a.m. ET — Upgrade with Confidence: MongoDB Version 8.0, the fastest MongoDB ever! Register now >

MongoDB and HashiCorp Terraform

Integrate MongoDB Atlas into your continuous delivery workflow using the HashiCorp Terraform MongoDB Atlas Provider to automate your data infrastructure deployments on any cloud provider.

How to use MongoDB Atlas and HashiCorp Terraform

The HashiCorp Terraform MongoDB Atlas Provider is the official plugin verified and tested by HashiCorp for managing MongoDB Atlas using Terraform.
Illustration of a hands typing on laptop.
number-1-inverse.svg

Sign up for MongoDB Atlas

If you don’t already use MongoDB Atlas, sign up for an account today. Distributed and secure by default, MongoDB Atlas is a global cloud database service available on all major cloud providers, including AWS, Microsoft Azure, and Google Cloud.

Get started
number-2-inverse.svg

Configure HashiCorp Terraform

To use the HashiCorp Terraform MongoDB Atlas Provider, you must first configure it with the proper credentials. Provide your credentials for authentication via static credentials or environment variables, then simply define your desired Atlas resources.

Use the provider
Configure HashiCorp Terraform
Integration of Terraform and MongoDB Atlas
number-3-inverse.svg

Deploy!

Once you’ve created your MongoDB Atlas account and configured your Terraform environment, the Terraform Provider works on your behalf to create Atlas resources in the environment of your choice.

View docs

Customers Using HashiCorp Terraform and MongoDB Atlas

Learn about Liberty Mutual's journey to the cloud and how it uses the HashiCorp Terraform MongoDB Atlas Provider.

Integration of Terraform and MongoDB Atlas

MongoDB support for Terraform CDK (CDKTF)

Deploy and manage infrastructure as code with more flexibility by using the CDKTF to easily deploy Atlas infrastructure to the cloud.
Learn More
Read blog

MongoDB Atlas and HashiCorp Terraform FAQ

Ready to get started?

Deploy MongoDB Atlas using the HashiCorp Terraform MongoDB Atlas Provider today.
Get Started
Illustration of a hands typing on laptop.