-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for project limits in project resource and project/proj…
…ects data sources (#1347) * INTMDB-554: support for project limits adjusting project resource and project/projects data sources * fix linting errors * favor sdk method for generating random names in project tests * include examples for project defining limits * refactor: extract getStateTeams/getStateAPIKeys/getStateLimits to common method improving naming and adding documentation to method * refactor: extract method for setting an api limit * refactor print statements to generate warning diagnostics in project data source * fix formatting in terraform example file * inlcude limits in projects data source example usage section
- Loading branch information
1 parent
50961d7
commit 9c13dc0
Showing
15 changed files
with
604 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ website/node_modules | |
*.tfvars | ||
service-account.json | ||
log.* | ||
test.env | ||
__debug_* | ||
|
||
website/vendor | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# MongoDB Atlas Provider -- Atlas Project with custom limits | ||
This example creates a Project and defines custom values for certain limits. | ||
|
||
Variables Required to be set: | ||
- `public_key`: Atlas public key | ||
- `private_key`: Atlas private key | ||
- `org_id`: Organization ID where project will be created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "mongodbatlas_project" "test" { | ||
name = "project-name" | ||
org_id = var.org_id | ||
|
||
limits { | ||
name = "atlas.project.deployment.clusters" | ||
value = 2 | ||
} | ||
|
||
limits { | ||
name = "atlas.project.deployment.nodesPerPrivateLinkRegion" | ||
value = 3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
provider "mongodbatlas" { | ||
public_key = var.public_key | ||
private_key = var.private_key | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
variable "public_key" { | ||
description = "Public API key to authenticate to Atlas" | ||
type = string | ||
} | ||
variable "private_key" { | ||
description = "Private API key to authenticate to Atlas" | ||
type = string | ||
} | ||
variable "org_id" { | ||
description = "Atlas Organization ID" | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_providers { | ||
mongodbatlas = { | ||
source = "mongodb/mongodbatlas" | ||
version = "~> 1.11" | ||
} | ||
} | ||
required_version = ">= 0.13" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.