Skip to content

Commit

Permalink
Allow passing additional node/cluster settings to crate.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hammerhead committed Jan 2, 2025
1 parent e41961e commit 874388d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions aws/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ data "cloudinit_config" "config" {
crate_protocol = var.crate.ssl_enable ? "https" : "http"
crate_ssl_certificate = base64encode(tls_self_signed_cert.ssl.cert_pem)
crate_ssl_private_key = base64encode(tls_private_key.ssl.private_key_pem)
cratedb_user_settings = indent(8, yamlencode(var.cratedb_settings))
}
)
}
Expand Down
2 changes: 2 additions & 0 deletions aws/scripts/cloud-init-cratedb-rpm.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ write_files:
ssl.keystore_filepath: /etc/crate/keystore.p12
ssl.keystore_password: changeit
ssl.keystore_key_password: changeit

${cratedb_user_settings}
owner: root:root
path: /etc/crate/crate.yml
permissions: "0755"
Expand Down
2 changes: 2 additions & 0 deletions aws/scripts/cloud-init-cratedb-tar.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ write_files:
ssl.keystore_filepath: /opt/crate/config/keystore.p12
ssl.keystore_password: changeit
ssl.keystore_key_password: changeit

${cratedb_user_settings}
owner: root:root
path: /opt/crate/config/crate.yml
permissions: "0755"
Expand Down
6 changes: 6 additions & 0 deletions aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ variable "crate" {
description = "CrateDB application configuration"
}

variable "cratedb_settings" {
type = map(string)
default = {}
description = "CrateDB settings applied to crate.yml"
}

variable "cratedb_password" {
type = string
default = null
Expand Down

0 comments on commit 874388d

Please sign in to comment.