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

Dmvp 3881 mongo atlas version upgrade #333

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion modules/ingress/tests/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.67.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.41 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/ingress/tests/multiple-domains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.67.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.0 |

## Modules

Expand Down
8 changes: 3 additions & 5 deletions modules/mongodb-atlas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ mongodbatlas_cloud_provider_snapshot_backup_policy resource requires access thro
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | > 0.15.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.72 |
| <a name="requirement_mongodbatlas"></a> [mongodbatlas](#requirement\_mongodbatlas) | >= 1.2 |
| <a name="requirement_mongodbatlas"></a> [mongodbatlas](#requirement\_mongodbatlas) | ~> 1.15.2 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.72 |
| <a name="provider_mongodbatlas"></a> [mongodbatlas](#provider\_mongodbatlas) | >= 1.2 |
| <a name="provider_mongodbatlas"></a> [mongodbatlas](#provider\_mongodbatlas) | ~> 1.15.2 |
| <a name="provider_random"></a> [random](#provider\_random) | n/a |

## Modules
Expand All @@ -96,7 +96,6 @@ No modules.
| [mongodbatlas_alert_configuration.main](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/alert_configuration) | resource |
| [mongodbatlas_auditing.audit](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/auditing) | resource |
| [mongodbatlas_cloud_backup_schedule.backup](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cloud_backup_schedule) | resource |
| [mongodbatlas_cloud_provider_snapshot_backup_policy.backup](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cloud_provider_snapshot_backup_policy) | resource |
| [mongodbatlas_cluster.main](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/cluster) | resource |
| [mongodbatlas_database_user.user](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/database_user) | resource |
| [mongodbatlas_network_peering.mongo_peers](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/network_peering) | resource |
Expand Down Expand Up @@ -146,8 +145,7 @@ No modules.
| <a name="input_provider_region_name"></a> [provider\_region\_name](#input\_provider\_region\_name) | Cloud service provider on which the server for a multi-tenant cluster is provisioned, valid for only when instanceSizeName is M2 or M5. | `string` | `null` | no |
| <a name="input_schedule_restore_window_days"></a> [schedule\_restore\_window\_days](#input\_schedule\_restore\_window\_days) | Number of days back in time you can restore to with point-in-time accuracy. | `number` | `1` | no |
| <a name="input_teams"></a> [teams](#input\_teams) | n/a | <pre>list(object({<br> team_id = string<br> role_names = list(string)<br> }))</pre> | `[]` | no |
| <a name="input_use_cloud_backup_schedule"></a> [use\_cloud\_backup\_schedule](#input\_use\_cloud\_backup\_schedule) | As use\_cloud\_provider\_snapshot\_backup\_policy is deprecated, this resource should be used, but it can't be used with the other one, so only one of these must be true. | `bool` | `false` | no |
| <a name="input_use_cloud_provider_snapshot_backup_policy"></a> [use\_cloud\_provider\_snapshot\_backup\_policy](#input\_use\_cloud\_provider\_snapshot\_backup\_policy) | mongodbatlas\_cloud\_provider\_snapshot\_backup\_policy is deprecated, but make use\_cloud\_provider\_snapshot\_backup\_policy true to use this resource. | `bool` | `false` | no |
| <a name="input_use_cloud_backup_schedule"></a> [use\_cloud\_backup\_schedule](#input\_use\_cloud\_backup\_schedule) | Whether to enable automated backups. | `bool` | `false` | no |
| <a name="input_users"></a> [users](#input\_users) | MongoDB Atlas users list, roles and scopes. | `list` | <pre>[<br> {<br> "roles": [<br> {<br> "database_name": "development",<br> "role_name": "readWrite"<br> }<br> ],<br> "scopes": [<br> {<br> "name": "cluster",<br> "type": "CLUSTER"<br> }<br> ],<br> "username": "alice"<br> }<br>]</pre> | no |
| <a name="input_with_default_alerts_settings"></a> [with\_default\_alerts\_settings](#input\_with\_default\_alerts\_settings) | It allows users to disable the creation of the default alert settings. | `bool` | `true` | no |

Expand Down
44 changes: 0 additions & 44 deletions modules/mongodb-atlas/backup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,47 +48,3 @@ resource "mongodbatlas_cloud_backup_schedule" "backup" {
}
}
}

resource "mongodbatlas_cloud_provider_snapshot_backup_policy" "backup" {
count = var.use_cloud_provider_snapshot_backup_policy ? 1 : 0

cluster_name = "von-poll-production"
project_id = "60f4858701216b7daa451896"
reference_hour_of_day = 11
reference_minute_of_hour = 10
restore_window_days = 4
update_snapshots = false

policies {
id = "60f48c80c65bed025f2b1e25"

policy_item {
frequency_interval = 1
frequency_type = "hourly"
id = "60f48c80c65bed025f2b1e26"
retention_unit = "days"
retention_value = 1
}
policy_item {
frequency_interval = 1
frequency_type = "daily"
id = "60f48c80c65bed025f2b1e27"
retention_unit = "days"
retention_value = 2
}
policy_item {
frequency_interval = 4
frequency_type = "weekly"
id = "60f48c80c65bed025f2b1e28"
retention_unit = "weeks"
retention_value = 3
}
policy_item {
frequency_interval = 5
frequency_type = "monthly"
id = "60f48c80c65bed025f2b1e29"
retention_unit = "months"
retention_value = 4
}
}
}
8 changes: 1 addition & 7 deletions modules/mongodb-atlas/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,10 @@ variable "policy_item_monthly" {
}
}

variable "use_cloud_provider_snapshot_backup_policy" {
type = bool
default = false
description = "mongodbatlas_cloud_provider_snapshot_backup_policy is deprecated, but make use_cloud_provider_snapshot_backup_policy true to use this resource."
}

variable "use_cloud_backup_schedule" {
type = bool
default = false
description = "As use_cloud_provider_snapshot_backup_policy is deprecated, this resource should be used, but it can't be used with the other one, so only one of these must be true."
description = "Whether to enable automated backups."
}

variable "cloud_backup" {
Expand Down
2 changes: 1 addition & 1 deletion modules/mongodb-atlas/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
mongodbatlas = {
source = "mongodb/mongodbatlas"
version = ">= 1.2"
version = "~> 1.15.2"
}

aws = {
Expand Down
Loading