Skip to content

Commit

Permalink
feat: Allow configuring auth_token_update_strategy (#232)
Browse files Browse the repository at this point in the history
* feat: Allow configuring auth_token_update_strategy

* break: Upgrade AWS provider to at least 5.27.0

---------

Co-authored-by: Igor Rodionov <[email protected]>
  • Loading branch information
amontalban and goruha authored Jun 9, 2024
1 parent 9f71399 commit 54be59a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
.idea
*.iml

# Locks
.terraform.lock.hcl

**/.build-harness
**/build-harness
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ resource "aws_elasticache_replication_group" "default" {
count = local.enabled ? 1 : 0

auth_token = var.transit_encryption_enabled ? var.auth_token : null
auth_token_update_strategy = var.auth_token_update_strategy
replication_group_id = var.replication_group_id == "" ? module.this.id : var.replication_group_id
description = coalesce(var.description, module.this.id)
node_type = var.instance_type
Expand Down
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ variable "auth_token" {
default = null
}

variable "auth_token_update_strategy" {
type = string
description = "Strategy to use when updating the auth_token. Valid values are `SET`, `ROTATE`, and `DELETE`. Defaults to `ROTATE`."
default = "ROTATE"

validation {
condition = contains(["set", "rotate", "delete"], lower(var.auth_token_update_strategy))
error_message = "Valid values for auth_token_update_strategy are `SET`, `ROTATE`, and `DELETE`."
}
}

variable "kms_key_id" {
type = string
description = "The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. `at_rest_encryption_enabled` must be set to `true`"
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.18"
version = ">= 5.27.0"
}
}
}

0 comments on commit 54be59a

Please sign in to comment.