Skip to content

Add force database recreate option #37

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

Closed
wants to merge 1 commit into from
Closed
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The module has been tested with:
| <a name="module_database"></a> [database](#module\_database) | ./modules/database | n/a |
| <a name="module_eks"></a> [eks](#module\_eks) | ./modules/eks | n/a |
| <a name="module_networking"></a> [networking](#module\_networking) | ./modules/networking | n/a |
| <a name="module_operator"></a> [operator](#module\_operator) | github.com/MaterializeInc/terraform-helm-materialize | v0.1.7 |
| <a name="module_operator"></a> [operator](#module\_operator) | github.com/MaterializeInc/terraform-helm-materialize | v0.1.8 |
| <a name="module_storage"></a> [storage](#module\_storage) | ./modules/storage | n/a |

## Resources
Expand Down Expand Up @@ -76,7 +76,7 @@ The module has been tested with:
| <a name="input_install_metrics_server"></a> [install\_metrics\_server](#input\_install\_metrics\_server) | Whether to install the metrics-server for the Materialize Console | `bool` | `true` | no |
| <a name="input_kubernetes_namespace"></a> [kubernetes\_namespace](#input\_kubernetes\_namespace) | The Kubernetes namespace for the Materialize resources | `string` | `"materialize-environment"` | no |
| <a name="input_log_group_name_prefix"></a> [log\_group\_name\_prefix](#input\_log\_group\_name\_prefix) | Prefix for the CloudWatch log group name (will be combined with environment name) | `string` | `"materialize"` | no |
| <a name="input_materialize_instances"></a> [materialize\_instances](#input\_materialize\_instances) | Configuration for Materialize instances | <pre>list(object({<br/> name = string<br/> namespace = optional(string)<br/> database_name = string<br/> environmentd_version = optional(string, "v0.130.4")<br/> cpu_request = optional(string, "1")<br/> memory_request = optional(string, "1Gi")<br/> memory_limit = optional(string, "1Gi")<br/> create_database = optional(bool, true)<br/> in_place_rollout = optional(bool, false)<br/> request_rollout = optional(string)<br/> force_rollout = optional(string)<br/> }))</pre> | `[]` | no |
| <a name="input_materialize_instances"></a> [materialize\_instances](#input\_materialize\_instances) | Configuration for Materialize instances | <pre>list(object({<br/> name = string<br/> namespace = optional(string)<br/> database_name = string<br/> environmentd_version = optional(string, "v0.130.4")<br/> cpu_request = optional(string, "1")<br/> memory_request = optional(string, "1Gi")<br/> memory_limit = optional(string, "1Gi")<br/> create_database = optional(bool, true)<br/> database_force_recreate = optional(bool, false)<br/> in_place_rollout = optional(bool, false)<br/> request_rollout = optional(string)<br/> force_rollout = optional(string)<br/> }))</pre> | `[]` | no |
| <a name="input_metrics_retention_days"></a> [metrics\_retention\_days](#input\_metrics\_retention\_days) | Number of days to retain CloudWatch metrics | `number` | `7` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace for all resources, usually the organization or project name | `string` | n/a | yes |
| <a name="input_network_id"></a> [network\_id](#input\_network\_id) | The ID of the VPC in which resources will be deployed. Only used if create\_vpc is false. | `string` | `""` | no |
Expand Down
15 changes: 8 additions & 7 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ variable "environment" {
variable "materialize_instances" {
description = "List of Materialize instances to be created."
type = list(object({
name = string
namespace = string
database_name = string
cpu_request = string
memory_request = string
memory_limit = string
create_database = optional(bool)
name = string
namespace = string
database_name = string
cpu_request = string
memory_request = string
memory_limit = string
create_database = optional(bool)
database_force_recreate = optional(bool)
}))
default = []
}
Expand Down
11 changes: 6 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module "database" {
}

module "operator" {
source = "github.com/MaterializeInc/terraform-helm-materialize?ref=v0.1.7"
source = "github.com/MaterializeInc/terraform-helm-materialize?ref=v0.1.8"

count = var.install_materialize_operator ? 1 : 0

Expand Down Expand Up @@ -145,10 +145,11 @@ locals {

instances = [
for instance in var.materialize_instances : {
name = instance.name
namespace = instance.namespace
database_name = instance.database_name
create_database = instance.create_database
name = instance.name
namespace = instance.namespace
database_name = instance.database_name
create_database = instance.create_database
database_force_recreate = instance.database_force_recreate

metadata_backend_url = format(
"postgres://%s:%s@%s/%s?sslmode=require",
Expand Down
23 changes: 12 additions & 11 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,18 @@ variable "helm_values" {
variable "materialize_instances" {
description = "Configuration for Materialize instances"
type = list(object({
name = string
namespace = optional(string)
database_name = string
environmentd_version = optional(string, "v0.130.4")
cpu_request = optional(string, "1")
memory_request = optional(string, "1Gi")
memory_limit = optional(string, "1Gi")
create_database = optional(bool, true)
in_place_rollout = optional(bool, false)
request_rollout = optional(string)
force_rollout = optional(string)
name = string
namespace = optional(string)
database_name = string
environmentd_version = optional(string, "v0.130.4")
cpu_request = optional(string, "1")
memory_request = optional(string, "1Gi")
memory_limit = optional(string, "1Gi")
create_database = optional(bool, true)
database_force_recreate = optional(bool, false)
in_place_rollout = optional(bool, false)
request_rollout = optional(string)
force_rollout = optional(string)
}))
default = []

Expand Down
Loading