Skip to content

Commit

Permalink
Merge pull request #24 from opencredo/create-variable-for-last-run
Browse files Browse the repository at this point in the history
Created terraform variable for last_run
  • Loading branch information
afaedda authored Nov 17, 2021
2 parents ad6b1b3 + 89a0c79 commit 0ecf90a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ resource "aws_ssm_parameter" "last_run" {
description = "Last run of Secure Pipeline. Format: 'YYYY-MM-DD'T'hh:mm:ssZ'."
name = "/Lambda/SecurePipelines/last_run"
type = "String"
# If the value doesn't exist then the last run will be the deployment time of this resource.
value = timestamp()
value = var.last_run
lifecycle {
# Fill the value when the resource is created for the first time. Later it might be changed outside of Terraform.
ignore_changes = [
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ variable "slack_token" {
variable "event_schedule_rate" {
description = "Rate for the event, in the form of 'rate(value unit)'. value: a positive number, unit: minute | minutes | hour | hours | day | days"
default = "rate(12 hours)"
}

variable "last_run" {
description = "Last run of Secure Pipeline service. If first run, set its value to a date in the past where you want to start verifying policies. Format: 'YYYY-MM-DD'T'hh:mm:ssZ'. "
}

0 comments on commit 0ecf90a

Please sign in to comment.