Skip to content

Commit

Permalink
Accept user input for version and config (close #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Dec 12, 2023
1 parent 69b60ad commit a72a148
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ module "transformer_kinesis" {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_name"></a> [name](#input\_name) | A name which will be pre-pended to the resources created | `string` | n/a | yes |
| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Version of transformer-kinesis | `string` | "5.8.0" | no |
| <a name="input_s3_bucket_name"></a> [s3\_bucket\_name](#input\_s3\_bucket\_name) | The name of the S3 bucket events will be loaded into | `string` | n/a | yes |
| <a name="input_s3_bucket_object_prefix"></a> [s3\_bucket\_object\_prefix](#input\_s3\_bucket\_object\_prefix) | An optional prefix under which Snowplow data will be saved | `string` | n/a | yes |
| <a name="input_ssh_key_name"></a> [ssh\_key\_name](#input\_ssh\_key\_name) | The name of the SSH key-pair to attach to all EC2 nodes deployed | `string` | n/a | yes |
Expand Down Expand Up @@ -145,6 +146,7 @@ module "transformer_kinesis" {
| <a name="input_transformer_compression"></a> [transformer\_compression](#input\_transformer\_compression) | Transformer output compression, GZIP or NONE | `string` | `"GZIP"` | no |
| <a name="input_user_provided_id"></a> [user\_provided\_id](#input\_user\_provided\_id) | An optional unique identifier to identify the telemetry events emitted by this stack | `string` | `""` | no |
| <a name="input_widerow_file_format"></a> [widerow\_file\_format](#input\_widerow\_file\_format) | The output file\_format from the widerow transformation\_type selected (json or parquet) | `string` | `"json"` | no |
| <a name="input_config_override_b64"></a> [config\_override\_b64](#input\_config\_override\_b64) | App config uploaded as a base64 encoded blob. This variable facilitates dev flow, if config is incorrect this can break the deployment. | `string` | `""` | no |

## Outputs

Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ locals {
module_version = "0.3.4"

app_name = "transformer-kinesis"
app_version = "5.6.0"
app_version = var.app_version

local_tags = {
Name = var.name
Expand Down Expand Up @@ -365,7 +365,7 @@ locals {
})

user_data = templatefile("${path.module}/templates/user-data.sh.tmpl", {
config_b64 = base64encode(local.config)
config_b64 = var.config_override_b64 == "" ? base64encode(local.config) : var.config_override_b64
iglu_resolver_b64 = base64encode(local.iglu_resolver)
version = local.app_version

Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ variable "name" {
type = string
}

variable "app_version" {
description = "Version of transformer kinesis"
type = string
default = "5.8.0"
}

variable "config_override_b64" {
description = "App config uploaded as a base64 encoded blob. This variable facilitates dev flow, if config is incorrect this can break the deployment."
type = string
default = ""
}

variable "vpc_id" {
description = "The VPC to deploy Transformer within"
type = string
Expand Down

0 comments on commit a72a148

Please sign in to comment.