Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.85 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.85 KB

terraform-provider-mongodbatlas

Build Status GitHub release GitHub downloads

Terraform provider for MongoDB Atlas.

Requirements

  • Terraform 0.11.x
  • Go 1.10 (to build the provider plugin)

Installing the Provider

Follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.

Usage

# Configure the MongoDB Atlas Provider
provider "mongodbatlas" {
  username = "${var.mongodb_atlas_username}"
  api_key = "${var.mongodb_atlas_api_key}"
}

# Create a Cluster
resource "mongodbatlas_cluster" "test" {
  # ...
}

Also look at the example under /examples.

Building the Provider

Clone and build the repository

go get github.com/akshaykarle/terraform-provider-mongodbatlas
make build

Symlink the binary to your terraform plugins directory:

ln -s $GOPATH/bin/terraform-provider-mongodbatlas ~/.terraform.d/plugins/

Updating the Provider

go get -u github.com/akshaykarle/terraform-provider-mongodbatlas
make build

NOTE

The mongodbatlas_project and mongodbatlas_container resources do not destroy the project or container (vpc) in mongo atlas. This due to limitation of the mongo atlas API as it doesn't support deleting these resources.