diff --git a/.deepsource.toml b/.deepsource.toml
index 18b001a..9fa5be7 100644
--- a/.deepsource.toml
+++ b/.deepsource.toml
@@ -1,4 +1,4 @@
version = 1
[[analyzers]]
-name = "terraform"
\ No newline at end of file
+name = "terraform"
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9e713a5..0a62a95 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,14 +1,14 @@
repos:
- repo: https://github.com/gruntwork-io/pre-commit
- rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
+ rev: v0.1.23 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
hooks:
- id: terraform-fmt
- id: shellcheck
- id: tflint
- - repo: git://github.com/pre-commit/pre-commit-hooks
- rev: v4.0.1 # Use the ref you want to point at
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.5.0 # Use the ref you want to point at
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
diff --git a/README.md b/README.md
index 5e3ebf9..42eb29b 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
Terraform Module Database
-
+
Terraform module to create Digitalocean database service resource on Digitalocean.
@@ -41,7 +41,7 @@
-We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy Bigger problems are always solved by breaking them into smaller manageable problems. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller connected yet manageable pieces within the infrastructure.
+We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy Bigger problems are always solved by breaking them into smaller manageable problems. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller connected yet manageable pieces within the infrastructure.
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
@@ -52,7 +52,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
## Prerequisites
-This module has a few dependencies:
+This module has a few dependencies:
- [Terraform 1.5.4](https://learn.hashicorp.com/terraform/getting-started/install.html)
@@ -385,7 +385,7 @@ Here are examples of how you can use this module in your inventory structure:
## Testing
-In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
+In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
You need to run the following command in the testing folder:
```hcl
@@ -394,7 +394,7 @@ You need to run the following command in the testing folder:
-## Feedback
+## Feedback
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-module-database/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-module-database)!
diff --git a/main.tf b/main.tf
index 9bf8632..5afeca6 100644
--- a/main.tf
+++ b/main.tf
@@ -26,6 +26,7 @@ resource "digitalocean_database_cluster" "cluster" {
eviction_policy = var.redis_eviction_policy
sql_mode = var.mysql_sql_mode
project_id = var.project_id
+ storage_size_mib = var.storage_size_mib
dynamic "maintenance_window" {
for_each = var.cluster_maintenance != null ? [var.cluster_maintenance] : []
@@ -101,7 +102,7 @@ resource "digitalocean_database_replica" "replica-example" {
cluster_id = join("", digitalocean_database_cluster.cluster[*].id)
name = format("%s-${var.cluster_engine}-replica", module.labels.id)
size = var.replica_size
- region = var.region
+ region = var.replica_region
tags = [module.labels.id]
private_network_uuid = var.cluster_private_network_uuid
}
diff --git a/variables.tf b/variables.tf
index 33c493f..40f4272 100644
--- a/variables.tf
+++ b/variables.tf
@@ -147,3 +147,8 @@ variable "replica_enable" {
default = false
description = "Flag to control the resources creation."
}
+variable "storage_size_mib" {
+ type = string
+ description = "Defines the disk size, in MiB, allocated to the cluster"
+ default = null
+}