diff --git a/README.md b/README.md
index 37575a8..c22e7b2 100644
--- a/README.md
+++ b/README.md
@@ -201,7 +201,7 @@ module "enrich_kinesis" {
| [instance\_type\_metrics](#module\_instance\_type\_metrics) | snowplow-devops/ec2-instance-type-metrics/aws | 0.1.2 |
| [kcl\_autoscaling](#module\_kcl\_autoscaling) | snowplow-devops/dynamodb-autoscaling/aws | 0.2.0 |
| [service](#module\_service) | snowplow-devops/service-ec2/aws | 0.2.1 |
-| [telemetry](#module\_telemetry) | snowplow-devops/telemetry/snowplow | 0.4.0 |
+| [telemetry](#module\_telemetry) | snowplow-devops/telemetry/snowplow | 0.5.0 |
## Resources
@@ -253,6 +253,7 @@ module "enrich_kinesis" {
| [vpc\_id](#input\_vpc\_id) | The VPC to deploy Enrich within (must have DNS hostnames enabled) | `string` | n/a | yes |
| [accept\_limited\_use\_license](#input\_accept\_limited\_use\_license) | Acceptance of the SLULA terms (https://docs.snowplow.io/limited-use-license-1.0/) | `bool` | `false` | no |
| [amazon\_linux\_2\_ami\_id](#input\_amazon\_linux\_2\_ami\_id) | The AMI ID to use which must be based of of Amazon Linux 2; by default the latest community version is used | `string` | `""` | no |
+| [app\_version](#input\_app\_version) | App version to use. This variable facilitates dev flow, the modules may not work with anything other than the default value. | `string` | `"3.9.0"` | no |
| [assets\_update\_period](#input\_assets\_update\_period) | Period after which enrich assets should be checked for updates (e.g. MaxMind DB) | `string` | `"7 days"` | no |
| [associate\_public\_ip\_address](#input\_associate\_public\_ip\_address) | Whether to assign a public ip address to this instance | `bool` | `true` | no |
| [byte\_limit](#input\_byte\_limit) | The amount of bytes to buffer events before pushing them to Kinesis | `number` | `1000000` | no |
@@ -282,7 +283,7 @@ module "enrich_kinesis" {
| [iam\_permissions\_boundary](#input\_iam\_permissions\_boundary) | The permissions boundary ARN to set on IAM roles created | `string` | `""` | no |
| [initial\_position](#input\_initial\_position) | Where to start processing the input Kinesis Stream from (TRIM\_HORIZON or LATEST) | `string` | `"TRIM_HORIZON"` | no |
| [instance\_type](#input\_instance\_type) | The instance type to use | `string` | `"t3a.small"` | no |
-| [java\_opts](#input\_java\_opts) | Custom JAVA Options | `string` | `"-Dorg.slf4j.simpleLogger.defaultLogLevel=info -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75"` | no |
+| [java\_opts](#input\_java\_opts) | Custom JAVA Options | `string` | `"-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"` | no |
| [kcl\_read\_max\_capacity](#input\_kcl\_read\_max\_capacity) | The maximum READ capacity for the KCL DynamoDB table | `number` | `10` | no |
| [kcl\_read\_min\_capacity](#input\_kcl\_read\_min\_capacity) | The minimum READ capacity for the KCL DynamoDB table | `number` | `1` | no |
| [kcl\_write\_max\_capacity](#input\_kcl\_write\_max\_capacity) | The maximum WRITE capacity for the KCL DynamoDB table | `number` | `10` | no |
diff --git a/main.tf b/main.tf
index 27d1675..5b2126a 100644
--- a/main.tf
+++ b/main.tf
@@ -3,7 +3,7 @@ locals {
module_version = "0.5.3"
app_name = "enrich-kinesis"
- app_version = "3.8.0"
+ app_version = var.app_version
local_tags = {
Name = var.name
@@ -26,7 +26,7 @@ data "aws_caller_identity" "current" {}
module "telemetry" {
source = "snowplow-devops/telemetry/snowplow"
- version = "0.4.0"
+ version = "0.5.0"
count = var.telemetry_enabled ? 1 : 0
@@ -375,7 +375,7 @@ locals {
user_data = templatefile("${path.module}/templates/user-data.sh.tmpl", {
accept_limited_use_license = var.accept_limited_use_license
- config = local.hocon
+ config_b64 = base64encode(local.hocon)
version = local.app_version
resolver = "dynamodb:${data.aws_region.current.name}/${aws_dynamodb_table.config.name}/snowplow_resolver"
enrichments = "dynamodb:${data.aws_region.current.name}/${aws_dynamodb_table.config.name}/snowplow_enrichment_"
diff --git a/templates/config.hocon.tmpl b/templates/config.hocon.tmpl
index f39570d..5a0c486 100644
--- a/templates/config.hocon.tmpl
+++ b/templates/config.hocon.tmpl
@@ -54,6 +54,7 @@
"autoGeneratedId": "${telemetry_auto_gen_id}"
"moduleName": "${telemetry_module_name}"
"moduleVersion": "${telemetry_module_version}"
+ "instanceId": $${INSTANCE_ID}
}
"featureFlags" : {
diff --git a/templates/user-data.sh.tmpl b/templates/user-data.sh.tmpl
index 8e9727f..55086dd 100644
--- a/templates/user-data.sh.tmpl
+++ b/templates/user-data.sh.tmpl
@@ -1,8 +1,8 @@
readonly CONFIG_DIR=/opt/snowplow/config
sudo mkdir -p $${CONFIG_DIR}
-sudo cat << EOF > $${CONFIG_DIR}/enrich.hocon
-${config}
+sudo base64 --decode << EOF > $${CONFIG_DIR}/enrich.hocon
+${config_b64}
EOF
sudo docker run \
@@ -19,10 +19,10 @@ sudo docker run \
--log-opt max-size=10m \
--log-opt max-file=5 \
%{ endif ~}
- -v $${CONFIG_DIR}:/snowplow/config \
- -e 'JAVA_OPTS=-Dconfig.override_with_env_vars=true ${java_opts}' \
+ --mount type=bind,source=$${CONFIG_DIR},target=/snowplow/config \
+ --env JDK_JAVA_OPTIONS='${java_opts}' \
--env ACCEPT_LIMITED_USE_LICENSE=${accept_limited_use_license} \
- -e "CONFIG_FORCE_telemetry_instanceId=$(get_instance_id)" \
+ --env INSTANCE_ID=$(get_instance_id) \
snowplow/snowplow-enrich-kinesis:${version} \
--config /snowplow/config/enrich.hocon \
--iglu-config ${resolver} \
diff --git a/variables.tf b/variables.tf
index d59751c..fe70057 100644
--- a/variables.tf
+++ b/variables.tf
@@ -14,6 +14,12 @@ variable "name" {
type = string
}
+variable "app_version" {
+ description = "App version to use. This variable facilitates dev flow, the modules may not work with anything other than the default value."
+ type = string
+ default = "3.9.0"
+}
+
variable "vpc_id" {
description = "The VPC to deploy Enrich within (must have DNS hostnames enabled)"
type = string
@@ -115,7 +121,7 @@ variable "cloudwatch_logs_retention_days" {
variable "java_opts" {
description = "Custom JAVA Options"
- default = "-Dorg.slf4j.simpleLogger.defaultLogLevel=info -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75"
+ default = "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75"
type = string
}