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

Destroy/Delete of Automation Job Schedule fail and terraform destroy abort #12923

Open
matthiasritter opened this issue Aug 10, 2021 · 1 comment
Assignees
Labels
sdk/requires-swagger-changes Changes need to be made in the Swagger specifications to enable this functionality service/automation upstream/microsoft/blocking-swagger-issue This label is applicable when waiting on Microsoft for an issue with the Swagger definition.

Comments

@matthiasritter
Copy link

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 -v
Terraform v1.0.4 on darwin_amd64

Affected Resource(s)

  • azurerm_automation_job_schedule

Terraform Configuration Files

resource "azurerm_automation_schedule" "stop-aks" {
  count                   = var.shutdown_outside_business_hours ? 1 : 0
  name                    = "stop-aks-${var.customer}-${var.customer_stage}"
  resource_group_name     = "aks-automation"
  automation_account_name = "aks-${substr(var.subscription_id, 0, 8)}"
  frequency               = "Week"
  interval                = 1
  timezone                = "Europe/Berlin"
  start_time              = "${formatdate("YYYY-MM-DD", timestamp())}T18:00:00+02:00"
  description             = "Stop AKS-Cluster every evening monday-friday"
  week_days               = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]

  lifecycle {
    ignore_changes = [
      start_time,
    ]
  }
}

ERROR Output

│ Error: Error issuing AzureRM delete request for Automation Job Schedule 'xxxx-xxxx-xxxxxx-xxx-xxxxx': automation.JobScheduleClient#Delete: Failure responding to request: StatusCode=204 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF

On the second "terraform destroy" the schedule is already deleted.

Expected Behaviour

Schedule should be deleted on first try and terraform should not abort

@tombuildsstuff tombuildsstuff added sdk/requires-swagger-changes Changes need to be made in the Swagger specifications to enable this functionality upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR service/automation labels Aug 10, 2021
@tombuildsstuff
Copy link
Contributor

@ArcturusZhang could you reach out to the service team to update the Swagger here?

@rcskosir rcskosir added upstream/microsoft/blocking-swagger-issue This label is applicable when waiting on Microsoft for an issue with the Swagger definition. and removed upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdk/requires-swagger-changes Changes need to be made in the Swagger specifications to enable this functionality service/automation upstream/microsoft/blocking-swagger-issue This label is applicable when waiting on Microsoft for an issue with the Swagger definition.
Projects
None yet
Development

No branches or pull requests

4 participants