From d3812a1a11bbcea6b6a25471c3a77ee02b2aba31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eligio=20Mari=C3=B1o?=
<22875166+gmeligio@users.noreply.github.com>
Date: Thu, 25 Jul 2024 00:12:53 +0200
Subject: [PATCH 1/2] build: upgrade aws provider to 5.29.0
---
README.md | 4 ++--
docs/terraform.md | 4 ++--
examples/complete/fixtures.us-east-2.tfvars | 2 ++
examples/complete/main.tf | 1 +
examples/complete/variables.tf | 6 ++++++
versions.tf | 2 +-
6 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index e9d23b4..03e03fa 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ Available targets:
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3 |
-| [aws](#requirement\_aws) | >= 5.21.0 |
+| [aws](#requirement\_aws) | >= 5.29.0 |
| [local](#requirement\_local) | >= 1.3 |
| [random](#requirement\_random) | >= 1.0 |
@@ -110,7 +110,7 @@ Available targets:
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 5.21.0 |
+| [aws](#provider\_aws) | >= 5.29.0 |
| [random](#provider\_random) | >= 1.0 |
## Modules
diff --git a/docs/terraform.md b/docs/terraform.md
index a2e6e99..a1e3edd 100644
--- a/docs/terraform.md
+++ b/docs/terraform.md
@@ -4,7 +4,7 @@
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3 |
-| [aws](#requirement\_aws) | >= 5.21.0 |
+| [aws](#requirement\_aws) | >= 5.29.0 |
| [local](#requirement\_local) | >= 1.3 |
| [random](#requirement\_random) | >= 1.0 |
@@ -12,7 +12,7 @@
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 5.21.0 |
+| [aws](#provider\_aws) | >= 5.29.0 |
| [random](#provider\_random) | >= 1.0 |
## Modules
diff --git a/examples/complete/fixtures.us-east-2.tfvars b/examples/complete/fixtures.us-east-2.tfvars
index 2c8d442..ca03dee 100644
--- a/examples/complete/fixtures.us-east-2.tfvars
+++ b/examples/complete/fixtures.us-east-2.tfvars
@@ -31,6 +31,8 @@ engine = "docdb"
storage_encrypted = true
+storage_type = "standard"
+
skip_final_snapshot = true
apply_immediately = true
diff --git a/examples/complete/main.tf b/examples/complete/main.tf
index 3d710d2..0a85d20 100644
--- a/examples/complete/main.tf
+++ b/examples/complete/main.tf
@@ -60,6 +60,7 @@ module "documentdb_cluster" {
engine = var.engine
engine_version = var.engine_version
storage_encrypted = var.storage_encrypted
+ storage_type = var.storage_type
kms_key_id = var.kms_key_id
skip_final_snapshot = var.skip_final_snapshot
enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
diff --git a/examples/complete/variables.tf b/examples/complete/variables.tf
index b9902ca..17cd302 100644
--- a/examples/complete/variables.tf
+++ b/examples/complete/variables.tf
@@ -119,6 +119,12 @@ variable "storage_encrypted" {
default = true
}
+variable "storage_type" {
+ type = string
+ description = "The storage type to associate with the DB cluster. Valid values: standard, iopt1"
+ default = "standard"
+}
+
variable "kms_key_id" {
type = string
description = "The ARN for the KMS encryption key. When specifying `kms_key_id`, `storage_encrypted` needs to be set to `true`"
diff --git a/versions.tf b/versions.tf
index 04c7896..cb86f2c 100644
--- a/versions.tf
+++ b/versions.tf
@@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
- version = ">= 5.21.0"
+ version = ">= 5.29.0"
}
local = {
source = "hashicorp/local"
From 8cae5f42ca2986cf9166779d43b65a0d01cd1b55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eligio=20Mari=C3=B1o?=
<22875166+gmeligio@users.noreply.github.com>
Date: Thu, 25 Jul 2024 17:47:31 +0200
Subject: [PATCH 2/2] Update examples/complete/variables.tf
Co-authored-by: Veronika Gnilitska <30597968+gberenice@users.noreply.github.com>
---
examples/complete/variables.tf | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/examples/complete/variables.tf b/examples/complete/variables.tf
index 17cd302..fb4e1a1 100644
--- a/examples/complete/variables.tf
+++ b/examples/complete/variables.tf
@@ -123,6 +123,11 @@ variable "storage_type" {
type = string
description = "The storage type to associate with the DB cluster. Valid values: standard, iopt1"
default = "standard"
+
+ validation {
+ condition = contains(["standard", "iopt1"], var.storage_type)
+ error_message = "Error: storage_type value must be one of two options - 'standard' or 'iopt1'."
+ }
}
variable "kms_key_id" {