Skip to content

feat: Support major version engine upgrades #188

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

Merged
merged 3 commits into from
Feb 14, 2021
Merged
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.43.0
rev: v1.45.0
hooks:
- id: terraform_fmt
- id: terraform_docs
Expand All @@ -20,6 +20,6 @@ repos:
- '--args=--only=terraform_standard_module_structure'
- '--args=--only=terraform_workspace_remote'
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.4.0
hooks:
- id: check-merge-conflict
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,21 @@ Terraform documentation is generated automatically using [pre-commit hooks](http
| Name | Version |
|------|---------|
| terraform | >= 0.12.6 |
| aws | >= 2.45 |
| aws | >= 3.8 |
| random | >= 2.2 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 2.45 |
| aws | >= 3.8 |
| random | >= 2.2 |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| allow\_major\_version\_upgrade | Determines whether major engine upgrades are allowed when changing engine version | `bool` | `false` | no |
| allowed\_cidr\_blocks | A list of CIDR blocks which are allowed to access the database | `list(string)` | `[]` | no |
| allowed\_security\_groups | A list of Security Group ID's to allow access to. | `list(string)` | `[]` | no |
| apply\_immediately | Determines whether or not any DB modifications are applied immediately, or during the maintenance window | `bool` | `false` | no |
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.45"
aws = ">= 3.8"
}
}
2 changes: 1 addition & 1 deletion examples/custom_instance_settings/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.45"
aws = ">= 3.8"
}
}
2 changes: 1 addition & 1 deletion examples/mysql/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.45"
aws = ">= 3.8"
random = ">= 2.2"
}
}
2 changes: 1 addition & 1 deletion examples/postgresql/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.45"
aws = ">= 3.8"
}
}
2 changes: 1 addition & 1 deletion examples/serverless/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.45"
aws = ">= 3.8"
}
}
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ resource "aws_rds_cluster" "this" {
engine = var.engine
engine_mode = var.engine_mode
engine_version = var.engine_version
allow_major_version_upgrade = var.allow_major_version_upgrade
enable_http_endpoint = var.enable_http_endpoint
kms_key_id = var.kms_key_id
database_name = var.database_name
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ variable "monitoring_interval" {
default = 0
}

variable "allow_major_version_upgrade" {
description = "Determines whether major engine upgrades are allowed when changing engine version"
type = bool
default = false
}

variable "auto_minor_version_upgrade" {
description = "Determines whether minor engine upgrades will be performed automatically in the maintenance window"
type = bool
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 0.12.6"

required_providers {
aws = ">= 2.45"
aws = ">= 3.8"
random = ">= 2.2"
}
}