Skip to content

Commit 65dbaea

Browse files
authored
Merge pull request #5 from cruxstack/development
feat: provide var to specific the desired version
2 parents 14eb68c + 82d4e03 commit 65dbaea

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ jobs:
1111
steps:
1212
- name: Checkout Code
1313
uses: actions/checkout@v3
14+
- name: Setup Terraform
15+
uses: hashicorp/setup-terraform@v3
1416
- name: Terraform Setup
15-
run: |
16-
terraform init
17+
run: terraform init
18+
- name: Terraform Validate
19+
run: terraform validate
1720
- name: Lint Terraform
1821
uses: reviewdog/action-tflint@master
1922
with:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ for more details on these variables.
4747
|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:---------:|:--------:|
4848
| `kms_key_alias_prefix` | The prefix for the KMS key alias. It must start with 'alias' and only include alphanumeric characters, dashes, underscores, colons or slashes, but doesn't end with a slash. | `string` | `"alias"` | no |
4949
| `service_log_level` | The log level for the service. It must be one of 'debug', 'info', 'warn', 'error', 'panic' or 'fatal'. | `string` | `"info"` | no |
50+
| `email_sender_version` | Version or git ref of the source code | `string` | `"latest"` | no |
5051
| `email_sender_enabled` | Whether or not the eamil sender is enabled. | `bool` | `false` | no |
5152
| `email_sender_policy_content` | The content of the Open Policy Agent policy for email sender. It must include the string 'package cognito_custom_sender_email_policy'. | `string` | n/a | yes |
5253
| `sms_sender_enabled` | Whether or not the SMS sender is enabled. | `bool` | `false` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ module "email_msg_sender_code" {
322322
docker_build_target = "package"
323323

324324
docker_build_args = {
325+
APP_VERSION = var.email_sender_version
325326
SERVICE_OPA_POLICY_ENCODED = terraform_data.email_msg_sender_policy[0].output
326327
}
327328

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ variable "service_log_level" {
2424

2525
# ------------------------------------------------------------- email-sender ---
2626

27+
variable "email_sender_version" {
28+
type = string
29+
default = "latest"
30+
}
31+
32+
2733
variable "email_sender_enabled" {
2834
description = "Whether or not the Email sender is enabled."
2935
type = bool

0 commit comments

Comments
 (0)