Skip to content

Commit

Permalink
refactor: 💡 remove confusing unneeded var
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskaransarkaria committed Mar 5, 2024
1 parent 96eb4a3 commit 63554da
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_allow_major_version_upgrade"></a> [allow\_major\_version\_upgrade](#input\_allow\_major\_version\_upgrade) | Indicates that major version upgrades are allowed. | `string` | `"false"` | no |
| <a name="input_allow_minor_version_upgrade"></a> [allow\_minor\_version\_upgrade](#input\_allow\_minor\_version\_upgrade) | Indicates that minor version upgrades are allowed. | `string` | `"true"` | no |
| <a name="input_application"></a> [application](#input\_application) | Application name | `string` | n/a | yes |
| <a name="input_backup_window"></a> [backup\_window](#input\_backup\_window) | The daily time range (in UTC) during which automated backups are created if they are enabled. Example: 09:46-10:16 | `string` | `""` | no |
Expand Down
1 change: 0 additions & 1 deletion examples/rds-mariadb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "rds_mariadb" {

# RDS configuration
allow_minor_version_upgrade = true
allow_major_version_upgrade = false
performance_insights_enabled = false
db_max_allocated_storage = "500"
# enable_rds_auto_start_stop = true # Uncomment to turn off your database overnight between 10PM and 6AM UTC / 11PM and 7AM BST.
Expand Down
1 change: 0 additions & 1 deletion examples/rds-mssql.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "rds_mssql" {

# RDS configuration
allow_minor_version_upgrade = true
allow_major_version_upgrade = false
performance_insights_enabled = false
db_max_allocated_storage = "500"
# enable_rds_auto_start_stop = true # Uncomment to turn off your database overnight between 10PM and 6AM UTC / 11PM and 7AM BST.
Expand Down
1 change: 0 additions & 1 deletion examples/rds-mysql.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "rds_mysql" {

# RDS configuration
allow_minor_version_upgrade = true
allow_major_version_upgrade = false
performance_insights_enabled = false
db_max_allocated_storage = "500"
# enable_rds_auto_start_stop = true # Uncomment to turn off your database overnight between 10PM and 6AM UTC / 11PM and 7AM BST.
Expand Down
3 changes: 1 addition & 2 deletions examples/rds-postgresql.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module "rds" {

# RDS configuration
allow_minor_version_upgrade = true
allow_major_version_upgrade = false
performance_insights_enabled = false
db_max_allocated_storage = "500"
# enable_rds_auto_start_stop = true # Uncomment to turn off your database overnight between 10PM and 6AM UTC / 11PM and 7AM BST.
Expand Down Expand Up @@ -43,7 +42,7 @@ module "read_replica" {
count = 0
source = "github.com/ministryofjustice/cloud-platform-terraform-rds-instance?ref=6.0.0"

vpc_name = var.vpc_name
vpc_name = var.vpc_name

# Tags
application = var.application
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ resource "aws_db_instance" "rds" {
snapshot_identifier = var.snapshot_identifier
replicate_source_db = var.replicate_source_db
auto_minor_version_upgrade = var.allow_minor_version_upgrade
allow_major_version_upgrade = (var.prepare_for_major_upgrade) ? true : var.allow_major_version_upgrade
allow_major_version_upgrade = (var.prepare_for_major_upgrade) ? true : false
parameter_group_name = (var.prepare_for_major_upgrade) ? "default.${var.rds_family}" : aws_db_parameter_group.custom_parameters.name
ca_cert_identifier = var.replicate_source_db != null ? null : var.ca_cert_identifier
performance_insights_enabled = var.performance_insights_enabled
Expand Down
6 changes: 0 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ variable "allow_minor_version_upgrade" {
type = string
}

variable "allow_major_version_upgrade" {
description = "Indicates that major version upgrades are allowed."
default = "false"
type = string
}

variable "rds_family" {
description = "Maps the engine version with the parameter group family, a family often covers several versions"
default = "postgres10"
Expand Down

0 comments on commit 63554da

Please sign in to comment.