From 205e9aa08e32243c211327c3ff10d9dac8fed0c6 Mon Sep 17 00:00:00 2001 From: Adel Abdelhak <6298183+blakelead@users.noreply.github.com> Date: Tue, 1 Dec 2020 18:43:44 +0100 Subject: [PATCH] fix: optional start_time (#1) * Compute start_time * Optional start_time * Optional start_time * Update variables.tf * Update variables.tf * Update variables.tf * Prepare release v2.0.1 --- CHANGELOG.md | 10 ++++++++++ main.tf | 2 +- variables.tf | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06e1eaa..3a73c95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ # Changelog +## v2.0.2 + +### Fixed + +- Optional start time, in order to avoid errors when applying module + +## v2.0.1 + +## v2.0.0 + ## v1.0.0 diff --git a/main.tf b/main.tf index 119458c..36e495a 100644 --- a/main.tf +++ b/main.tf @@ -4,7 +4,7 @@ resource "azurerm_automation_schedule" "schedule" { automation_account_name = var.automation_account_name frequency = var.frequency interval = var.interval - start_time = var.start_time + start_time = var.start_time == "" ? null : var.start_time expiry_time = var.expiry_time timezone = var.timezone week_days = var.week_days diff --git a/variables.tf b/variables.tf index 61278e1..531ec6c 100644 --- a/variables.tf +++ b/variables.tf @@ -19,6 +19,7 @@ variable "frequency" { variable "start_time" { type = string description = "(Optional) Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created." + default = "" } variable "expiry_time" {