Skip to content

Commit cc5ffe5

Browse files
committed
Make disk config optional
1 parent bfcecd9 commit cc5ffe5

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export AWS_PROFILE=your-profile-name
116116
| <a name="input_enable_bucket_encryption"></a> [enable\_bucket\_encryption](#input\_enable\_bucket\_encryption) | Enable server-side encryption for the S3 bucket | `bool` | `true` | no |
117117
| <a name="input_enable_bucket_versioning"></a> [enable\_bucket\_versioning](#input\_enable\_bucket\_versioning) | Enable versioning for the S3 bucket | `bool` | `true` | no |
118118
| <a name="input_enable_cluster_creator_admin_permissions"></a> [enable\_cluster\_creator\_admin\_permissions](#input\_enable\_cluster\_creator\_admin\_permissions) | To add the current caller identity as an administrator | `bool` | `true` | no |
119+
| <a name="input_enable_disk_setup"></a> [enable\_disk\_setup](#input\_enable\_disk\_setup) | Whether to enable disk setup | `bool` | `true` | no |
119120
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Enable CloudWatch monitoring | `bool` | `true` | no |
120121
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name (e.g., prod, staging, dev) | `string` | n/a | yes |
121122
| <a name="input_helm_chart"></a> [helm\_chart](#input\_helm\_chart) | Chart name from repository or local path to chart. For local charts, set the path to the chart directory. | `string` | `"materialize-operator"` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module "eks" {
3535
node_group_capacity_type = var.node_group_capacity_type
3636
enable_cluster_creator_admin_permissions = var.enable_cluster_creator_admin_permissions
3737
install_openebs = var.install_openebs
38+
enable_disk_setup = var.enable_disk_setup
3839

3940
tags = local.common_tags
4041

modules/eks/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ module "eks" {
3434
labels = {
3535
Environment = var.environment
3636
GithubRepo = "materialize"
37-
"materialize.cloud/disk" = "true"
37+
"materialize.cloud/disk" = var.enable_disk_setup ? "true" : "false"
3838
"workload" = "materialize-instance"
3939
}
4040

41-
cloudinit_pre_nodeadm = [
41+
cloudinit_pre_nodeadm = var.enable_disk_setup ? [
4242
{
4343
content_type = "text/x-shellscript"
4444
content = local.disk_setup_script
4545
}
46-
]
46+
] : []
4747

4848
}
4949
}

modules/eks/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,9 @@ variable "openebs_version" {
9191
type = string
9292
default = "4.2.0"
9393
}
94+
95+
variable "enable_disk_setup" {
96+
description = "Whether to enable disk setup using the bootstrap script"
97+
type = bool
98+
default = true
99+
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@ variable "install_openebs" {
370370
default = true
371371
}
372372

373+
variable "enable_disk_setup" {
374+
description = "Whether to enable disk setup"
375+
type = bool
376+
default = true
377+
}
378+
373379
variable "storage_class_create" {
374380
description = "Whether to create the storage class"
375381
type = bool

0 commit comments

Comments
 (0)