Skip to content

Commit d65451b

Browse files
authored
feat: add allow_major_version_upgrade argument (#94)
1 parent cb776c0 commit d65451b

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ Available targets:
101101
| Name | Version |
102102
|------|---------|
103103
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
104-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.0 |
104+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.21.0 |
105105
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.3 |
106106
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 1.0 |
107107

108108
## Providers
109109

110110
| Name | Version |
111111
|------|---------|
112-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.0 |
112+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.21.0 |
113113
| <a name="provider_random"></a> [random](#provider\_random) | >= 1.0 |
114114

115115
## Modules
@@ -142,6 +142,7 @@ Available targets:
142142
|------|-------------|------|---------|:--------:|
143143
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br>This is for some rare cases where resources want additional configuration of tags<br>and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
144144
| <a name="input_allow_ingress_from_self"></a> [allow\_ingress\_from\_self](#input\_allow\_ingress\_from\_self) | Adds the Document DB security group itself as a source for ingress rules. Useful when this security group will be shared with applications. | `bool` | `false` | no |
145+
| <a name="input_allow_major_version_upgrade"></a> [allow\_major\_version\_upgrade](#input\_allow\_major\_version\_upgrade) | Specifies whether major version upgrades are allowed. See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/docdb_cluster#allow_major_version_upgrade | `bool` | `false` | no |
145146
| <a name="input_allowed_cidr_blocks"></a> [allowed\_cidr\_blocks](#input\_allowed\_cidr\_blocks) | List of CIDR blocks to be allowed to connect to the DocumentDB cluster | `list(string)` | `[]` | no |
146147
| <a name="input_allowed_egress_cidr_blocks"></a> [allowed\_egress\_cidr\_blocks](#input\_allowed\_egress\_cidr\_blocks) | List of CIDR blocks to be allowed to send traffic outside of the DocumentDB cluster | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
147148
| <a name="input_allowed_security_groups"></a> [allowed\_security\_groups](#input\_allowed\_security\_groups) | List of existing Security Groups to be allowed to connect to the DocumentDB cluster | `list(string)` | `[]` | no |

docs/terraform.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
| Name | Version |
55
|------|---------|
66
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
7-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 2.0 |
7+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.21.0 |
88
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.3 |
99
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 1.0 |
1010

1111
## Providers
1212

1313
| Name | Version |
1414
|------|---------|
15-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 2.0 |
15+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.21.0 |
1616
| <a name="provider_random"></a> [random](#provider\_random) | >= 1.0 |
1717

1818
## Modules
@@ -45,6 +45,7 @@
4545
|------|-------------|------|---------|:--------:|
4646
| <a name="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.<br>This is for some rare cases where resources want additional configuration of tags<br>and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
4747
| <a name="input_allow_ingress_from_self"></a> [allow\_ingress\_from\_self](#input\_allow\_ingress\_from\_self) | Adds the Document DB security group itself as a source for ingress rules. Useful when this security group will be shared with applications. | `bool` | `false` | no |
48+
| <a name="input_allow_major_version_upgrade"></a> [allow\_major\_version\_upgrade](#input\_allow\_major\_version\_upgrade) | Specifies whether major version upgrades are allowed. See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/docdb_cluster#allow_major_version_upgrade | `bool` | `false` | no |
4849
| <a name="input_allowed_cidr_blocks"></a> [allowed\_cidr\_blocks](#input\_allowed\_cidr\_blocks) | List of CIDR blocks to be allowed to connect to the DocumentDB cluster | `list(string)` | `[]` | no |
4950
| <a name="input_allowed_egress_cidr_blocks"></a> [allowed\_egress\_cidr\_blocks](#input\_allowed\_egress\_cidr\_blocks) | List of CIDR blocks to be allowed to send traffic outside of the DocumentDB cluster | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
5051
| <a name="input_allowed_security_groups"></a> [allowed\_security\_groups](#input\_allowed\_security\_groups) | List of existing Security Groups to be allowed to connect to the DocumentDB cluster | `list(string)` | `[]` | no |

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 2.0"
7+
version = ">= 5.21.0"
88
}
99
local = {
1010
source = "hashicorp/local"

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ resource "aws_docdb_cluster" "default" {
7979
engine = var.engine
8080
engine_version = var.engine_version
8181
enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
82+
allow_major_version_upgrade = var.allow_major_version_upgrade
8283
tags = module.this.tags
8384
}
8485

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,9 @@ variable "ssm_parameter_path_prefix" {
233233
default = "/docdb/master-password/"
234234
description = "The path prefix for the created SSM parameter e.g. '/docdb/master-password/dev'. `ssm_parameter_enabled` must be set to `true` for this to take affect."
235235
}
236+
237+
variable "allow_major_version_upgrade" {
238+
type = bool
239+
description = "Specifies whether major version upgrades are allowed. See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/docdb_cluster#allow_major_version_upgrade"
240+
default = false
241+
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 2.0"
7+
version = ">= 5.21.0"
88
}
99
local = {
1010
source = "hashicorp/local"

0 commit comments

Comments
 (0)