Skip to content

Commit

Permalink
Merge pull request #4 from sironite/Feat/lifecycle
Browse files Browse the repository at this point in the history
feat: add lifecycle
  • Loading branch information
TheIronRock95 authored Jun 30, 2023
2 parents 6899f4d + 84a83e2 commit 7da5838
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ resource "azurerm_key_vault_key" "this" {
dynamic "automatic" {
for_each = var.enable_automatic_rotation ? [1] : []
content {
time_after_creation = var.time_after_creation
time_after_creation = var.time_after_creation
time_before_expiry = var.time_before_expiry
}
}
}
}

lifecycle {
ignore_changes = [
rotation_policy,
]
}
}
12 changes: 6 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@ variable "key_opts" {
variable "enable_rotation_policy" {
type = bool
description = "Whether to enable rotation policy for the key"
default = false
default = false
}

variable "expire_after" {
type = string
description = "The duration after which the key should expire"
default = "P90D"
default = "P90D"
}

variable "notify_before_expiry" {
type = string
description = "The duration before expiry to notify"
default = "P30D"
default = "P30D"
}

variable "enable_automatic_rotation" {
type = bool
description = "Whether to enable automatic rotation for the key"
default = false
default = false
}

variable "time_after_creation" {
type = string
description = "The duration after creation to rotate the key"
default = ""
default = ""
}

variable "time_before_expiry" {
type = string
description = "The duration before expiry to rotate the key"
default = ""
default = ""
}

0 comments on commit 7da5838

Please sign in to comment.