Skip to content

Commit

Permalink
Accept user input for version and config (close #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Dec 12, 2023
1 parent 81617f3 commit d00490e
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 @@ -164,6 +164,7 @@ module "rs_loader" {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_name"></a> [name](#input\_name) | A name which will be prepended to the resources created | `string` | n/a | yes |
| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Version of rdb-loader-redshift | `string` | "5.8.0" | no |
| <a name="input_redshift_aws_s3_bucket_name"></a> [redshift\_aws\_s3\_bucket\_name](#input\_redshift\_aws\_s3\_bucket\_name) | AWS bucket name where data to load is stored | `string` | n/a | yes |
| <a name="input_redshift_database"></a> [redshift\_database](#input\_redshift\_database) | Redshift database name | `string` | n/a | yes |
| <a name="input_redshift_host"></a> [redshift\_host](#input\_redshift\_host) | Redshift cluster hostname | `string` | n/a | yes |
Expand Down Expand Up @@ -215,6 +216,7 @@ module "rs_loader" {
| <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_webhook_collector"></a> [webhook\_collector](#input\_webhook\_collector) | URL of webhook collector | `string` | `""` | no |
| <a name="input_webhook_enabled"></a> [webhook\_enabled](#input\_webhook\_enabled) | Whether webhook should be enabled or not | `bool` | `false` | 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.1.1"

app_name = "rdb-loader-redshift"
app_version = "5.6.0"
app_version = var.app_version

local_tags = {
Name = var.name
Expand Down Expand Up @@ -364,7 +364,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 rdb loader redshift"
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 "iam_permissions_boundary" {
description = "The permissions boundary ARN to set on IAM roles created"
default = ""
Expand Down

0 comments on commit d00490e

Please sign in to comment.