Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_automation_schedule is not usable for subsequent terraform runs without updating its start_time to a future time #5726

Closed
t3mi opened this issue Feb 13, 2020 · 1 comment · Fixed by #5876

Comments

@t3mi
Copy link
Contributor

t3mi commented Feb 13, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.12.20

  • provider.azurerm v1.44.0

Affected Resource(s)

  • azurerm_automation_schedule

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  name     = "tfex-automation-account"
  location = "West Europe"
}

resource "azurerm_automation_account" "example" {
  name                = "tfex-automation-account"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku_name            = "Basic"
}

resource "azurerm_automation_schedule" "example" {
  name                    = "tfex-automation-schedule"
  resource_group_name     = azurerm_resource_group.example.name
  automation_account_name = azurerm_automation_account.example.name
  frequency               = "Week"
  interval                = 1
  timezone                = "Central Europe Standard Time"
  start_time              = "2020-02-13T11:15:00+02:00"
  description             = "This is an example schedule"
  week_days               = ["Friday"]
}

Debug Output

Panic Output

Expected Behavior

Plan or apply should complete successfully subsequently after initial resource provisioning as start_time is a fixed value and it wasn't changed.

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.

Actual Behavior

Error: "start_time" is "2020-02-13T11:15:00+02:00" and should be at least "5m0s" in the future

  on main.tf line 13, in resource "azurerm_automation_schedule" "example":
  13: resource "azurerm_automation_schedule" "example" {

Steps to Reproduce

  1. terraform init
  2. Change start_time to +7-8 minutes from your current time
  3. terraform apply
  4. Wait for 3+ minutes to get into 5min barrier between specified start_time and your current time or wait for current time to get past start_time
  5. terraform plan

Important Factoids

References

  • #0000
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants