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_software_update_configuration | time_zone Id is not valid #21180

Closed
1 task done
AGelemerov opened this issue Mar 29, 2023 · 2 comments · Fixed by #21254
Closed
1 task done

azurerm_automation_software_update_configuration | time_zone Id is not valid #21180

AGelemerov opened this issue Mar 29, 2023 · 2 comments · Fixed by #21254
Labels

Comments

@AGelemerov
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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 Version

1.4.2

AzureRM Provider Version

3.49.0

Affected Resource(s)/Data Source(s)

azurerm_automation_software_update_configuration

Terraform Configuration Files

resource "azurerm_automation_software_update_configuration" "main" {

  for_each              = var.update_configuration != null ? var.update_configuration : {}

  name                  = lower(each.key)

  automation_account_id = azurerm_automation_account.main.id

  operating_system      = each.value.operating_system

  duration              = each.value.duration





  dynamic "linux" {

    for_each = title(each.value.operating_system) == "Linux" ? [1] : []

    content {

      classification_included = join("", each.value.linux.classification_included)

      excluded_packages       = each.value.linux.excluded_packages

      included_packages       = each.value.linux.included_packages

      reboot                  = each.value.linux.reboot

    }

  }




  dynamic "windows" {

    for_each = title(each.value.operating_system) == "Windows" ? [1] : []

    content {

      classifications_included        = each.value.windows.classifications_included

      excluded_knowledge_base_numbers = each.value.windows.excluded_knowledge_base_numbers

      included_knowledge_base_numbers = each.value.windows.included_knowledge_base_numbers

      reboot                          = each.value.windows.reboot

    }

  }




  pre_task {

    source     = each.value.pre_task.name

    parameters = each.value.pre_task.parameters

  }




  post_task {

    source     = each.value.post_task.name

    parameters = each.value.post_task.parameters

  }




  target {

    azure_query {

      scope     = each.value.target.scope

      locations = each.value.target.locations




      tags {

        tag    = each.value.target.tags.tag

        values = each.value.target.tags.values

      }

    }

  }




  schedule {

    is_enabled  = each.value.schedule.is_enabled

    frequency   = each.value.schedule.frequency

    description = each.value.schedule.description

    start_time  = each.value.schedule.start_time




    dynamic "monthly_occurrence" {

      for_each = each.value.schedule.monthly_occurrence != null ? [1] : []

      content {

        day        = each.value.schedule.monthly_occurrence.day

        occurrence = each.value.schedule.monthly_occurrence.occurrence

      }




    }

  }

  lifecycle {

    ignore_changes = [

      schedule.0.start_time

    ]

  }




}

Debug Output/Panic Output

│ softwareupdateconfiguration.SoftwareUpdateConfigurationClient#SoftwareUpdateConfigurationsCreate:

│ Failure responding to request: StatusCode=400 -- Original Error:

│ autorest/azure: Service returned an error. Status=400 Code="BadRequest"

│ Message="{\"Message\":\"The request is

│ invalid.\",\"ModelState\":{\"softwareUpdateConfiguration.properties.scheduleInfo.timeZone\":[\"The

│ time zone ID specified is not a valid time zone ID.\"]}}"

Expected Behaviour

Software update configuration applies UTC time zone as per documentation.

Actual Behaviour

On Terraform documentation it says default value for "time_zone" is "UTC", after apply I get this error.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/automation_software_update_configuration

@AGelemerov AGelemerov added the bug label Mar 29, 2023
@github-actions github-actions bot removed the bug label Mar 29, 2023
@ASHR4
Copy link
Contributor

ASHR4 commented Mar 29, 2023

Hi Guys,

I am getting the same thing, not sure if the Azure API has changed causing this error.

Look forward to a fix :)

Ta

Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants