Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Integrate MongoDB Atlas Serverless in example module #1

Merged
merged 5 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.terraform

examples/basic/.terraform
examples/basic/terraform.tfstate*
examples/basic/credentials.tf
examples/*/.terraform
examples/*/terraform.tfstate*
examples/*/.terraform.tfstate.lock.info
examples/*/terraform.tfvars
examples/*/credentials.tf
22 changes: 22 additions & 0 deletions examples/basic/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions examples/basic/mongodb.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "mongodbatlas_serverless_instance" "main" {
project_id = var.mongodbatlas_project_id
name = "awala-endpoint"

provider_settings_backing_provider_name = "GCP"
provider_settings_provider_name = "SERVERLESS"
provider_settings_region_name = "WESTERN_EUROPE"
}
13 changes: 13 additions & 0 deletions examples/basic/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas"
version = "~> 1.10.2"
}
}
}

provider "mongodbatlas" {
public_key = var.mongodbatlas_public_key
private_key = var.mongodbatlas_private_key
}
9 changes: 9 additions & 0 deletions examples/basic/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
variable "mongodbatlas_public_key" {
description = "MongoDB Atlas public key"
}

variable "mongodbatlas_private_key" {
description = "MongoDB Atlas private key"
}

variable "mongodbatlas_project_id" {}