File tree Expand file tree Collapse file tree 16 files changed +508
-1
lines changed
examples/test-upgrade/v090 Expand file tree Collapse file tree 16 files changed +508
-1
lines changed Original file line number Diff line number Diff line change 4
4
example.tf
5
5
terraform.tfplan
6
6
terraform.tfstate
7
+ .terraform.lock.hcl
7
8
bin /
8
9
modules-dev /
9
10
/pkg /
Original file line number Diff line number Diff line change
1
+ resource "mongodbatlas_project" "test" {
2
+ name = var. project_name
3
+ org_id = var. org_id
4
+ }
5
+
6
+ resource "mongodbatlas_cluster" "test" {
7
+ project_id = mongodbatlas_project. test . id
8
+ name = var. cluster_name
9
+ disk_size_gb = 100
10
+ num_shards = 1
11
+ replication_factor = 3
12
+ provider_backup_enabled = true
13
+ pit_enabled = true
14
+ auto_scaling_disk_gb_enabled = true
15
+ mongo_db_major_version = var. mongodb_major_version
16
+
17
+ // Provider Settings "block"
18
+ provider_name = " AWS"
19
+ provider_disk_iops = 300
20
+ provider_encrypt_ebs_volume = false
21
+ provider_instance_size_name = " M30"
22
+ provider_region_name = " EU_CENTRAL_1"
23
+ }
24
+
25
+ output "project_id" {
26
+ value = mongodbatlas_project. test . id
27
+ }
28
+ output "cluster_name" {
29
+ value = mongodbatlas_cluster. test . name
30
+ }
Original file line number Diff line number Diff line change
1
+ variable "public_key" {
2
+ description = " The public API key for MongoDB Atlas"
3
+ default = " "
4
+ }
5
+ variable "private_key" {
6
+ description = " The private API key for MongoDB Atlas"
7
+ default = " "
8
+ }
9
+ variable "project_name" {
10
+ description = " Atlas project name"
11
+ default = " "
12
+ }
13
+ variable "org_id" {
14
+ description = " The organization ID"
15
+ default = " "
16
+ }
17
+ variable "cluster_name" {
18
+ description = " Cluster name"
19
+ default = " "
20
+ }
21
+ variable "mongodb_major_version" {
22
+ description = " MongoDB major version"
23
+ default = " "
24
+ }
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ mongodbatlas = {
4
+ source = " mongodb/mongodbatlas"
5
+ version = " 0.8.2"
6
+ }
7
+ }
8
+ required_version = " >= 0.13"
9
+ }
Original file line number Diff line number Diff line change
1
+ resource "mongodbatlas_project" "test" {
2
+ name = var. project_name
3
+ org_id = var. org_id
4
+ }
5
+
6
+ resource "mongodbatlas_cluster" "test" {
7
+ project_id = mongodbatlas_project. test . id
8
+ name = var. cluster_name
9
+ disk_size_gb = 100
10
+ num_shards = 1
11
+ replication_factor = 3
12
+ provider_backup_enabled = true
13
+ pit_enabled = true
14
+ auto_scaling_disk_gb_enabled = true
15
+ mongo_db_major_version = var. mongodb_major_version
16
+
17
+ // Provider Settings "block"
18
+ provider_name = " AWS"
19
+ provider_disk_iops = 300
20
+ provider_encrypt_ebs_volume = false
21
+ provider_instance_size_name = " M30"
22
+ provider_region_name = " EU_CENTRAL_1"
23
+ }
24
+
25
+ output "project_id" {
26
+ value = mongodbatlas_project. test . id
27
+ }
28
+ output "cluster_name" {
29
+ value = mongodbatlas_cluster. test . name
30
+ }
Original file line number Diff line number Diff line change
1
+ variable "public_key" {
2
+ description = " The public API key for MongoDB Atlas"
3
+ default = " "
4
+ }
5
+ variable "private_key" {
6
+ description = " The private API key for MongoDB Atlas"
7
+ default = " "
8
+ }
9
+ variable "project_name" {
10
+ description = " Atlas project name"
11
+ default = " "
12
+ }
13
+ variable "org_id" {
14
+ description = " The organization ID"
15
+ default = " "
16
+ }
17
+ variable "cluster_name" {
18
+ description = " Cluster name"
19
+ default = " "
20
+ }
21
+ variable "mongodb_major_version" {
22
+ description = " MongoDB major version"
23
+ default = " "
24
+ }
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ mongodbatlas = {
4
+ source = " mongodb/mongodbatlas"
5
+ version = " 0.7.0"
6
+ }
7
+ }
8
+ required_version = " >= 0.13"
9
+ }
Original file line number Diff line number Diff line change
1
+ resource "mongodbatlas_project" "test" {
2
+ name = var. project_name
3
+ org_id = var. org_id
4
+ }
5
+
6
+ resource "mongodbatlas_database_user" "test" {
7
+ username = var. username
8
+ x509_type = " CUSTOMER"
9
+ project_id = mongodbatlas_project. test . id
10
+ auth_database_name = " $external"
11
+
12
+ roles {
13
+ role_name = var. role_name
14
+ database_name = " admin"
15
+ }
16
+
17
+ labels {
18
+ key = " First Key"
19
+ value = " First Value"
20
+ }
21
+ }
22
+
23
+ output "project_id" {
24
+ value = mongodbatlas_project. test . id
25
+ }
26
+ output "username" {
27
+ value = mongodbatlas_database_user. test . username
28
+ }
29
+ output "auth_database_name" {
30
+ value = mongodbatlas_database_user. test . auth_database_name
31
+ }
Original file line number Diff line number Diff line change
1
+ variable "public_key" {
2
+ description = " The public API key for MongoDB Atlas"
3
+ default = " "
4
+ }
5
+ variable "private_key" {
6
+ description = " The private API key for MongoDB Atlas"
7
+ default = " "
8
+ }
9
+ variable "project_name" {
10
+ description = " Atlas project name"
11
+ default = " "
12
+ }
13
+ variable "org_id" {
14
+ description = " The organization ID"
15
+ default = " "
16
+ }
17
+ variable "username" {
18
+ description = " Username"
19
+ default = " "
20
+ }
21
+ variable "role_name" {
22
+ description = " The role name"
23
+ default = " "
24
+ }
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ mongodbatlas = {
4
+ source = " mongodb/mongodbatlas"
5
+ version = " 0.8.2"
6
+ }
7
+ }
8
+ required_version = " >= 0.13"
9
+ }
You can’t perform that action at this time.
0 commit comments