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 needs tag's in Azure Query #19454

Closed
1 task done
marcvalk-git opened this issue Nov 28, 2022 · 3 comments · Fixed by #19516
Closed
1 task done

azurerm_automation_software_update_configuration needs tag's in Azure Query #19454

marcvalk-git opened this issue Nov 28, 2022 · 3 comments · Fixed by #19516
Labels
Milestone

Comments

@marcvalk-git
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

With azurerm_automation_software_update_configuration i need to provide tags in my azure_query field. If not provided (which is available through portal --> only a subscription scope), it will

  • 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.3.5

AzureRM Provider Version

3.33.0

Affected Resource(s)/Data Source(s)

azurerm_automation_software_update_configuration

Terraform Configuration Files

resource "azurerm_automation_software_update_configuration" "definition_updates_config" {
  name                  = "updates"
  automation_account_id = var.automationaccount.id
  operating_system      = "Windows"
  duration              = "PT2H"
  windows {
    classifications_included = ["Definition"]
    reboot                   = "Never"
  }

  target {
    azure_query {
      scope = [ data.azurerm_subscription.current.id ]
    }
  }
  schedule {
    is_enabled  = true
    frequency   = "Hour"
    description = "Windows Definition Updates"
    interval    = 2
    time_zone   = "Etc/UTC"
    start_time  = "2022-11-28T13:00:00Z"
    expiry_time = "2025-11-28T13:00:00Z"
  }
}

Debug Output/Panic Output

Error: creating Software Update Configuration: (Name "updates" / Automation Account Name "automation-001" / Resource Group "rg-automation"): automation.SoftwareUpdateConfigurationsClient#Create: 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.updateConfiguration.targets.azureQueries[0].tagSettings.tags\":[\"The tags field is required.\"]}}"
│
│   with azurerm_automation_software_update_configuration.definition_updates_config,
│   on automation.tf line 46, in resource "azurerm_automation_software_update_configuration" "definition_updates_config":
│   46: resource "azurerm_automation_software_update_configuration" "definition_updates_config" {
│
│ creating Software Update Configuration: (Name "updates" / Automation Account Name "automation-001" /  
│ Resource Group "rg-automation"): automation.SoftwareUpdateConfigurationsClient#Create: 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.updateConfiguration.targets.azureQueries[0].tagSettings.tags\":[\"The
│ tags field is required.\"]}}"

Expected Behaviour

I would expect that just having the scope to the subscription with nothing else, it would apply, as this can also be configured by the portal.

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@github-actions github-actions bot removed the bug label Nov 28, 2022
@wuxu92
Copy link
Contributor

wuxu92 commented Dec 1, 2022

Hi @marcvalk-git thanks for your feedback! this looks like a server-side bug/incompatible. I'm creating a PR to work around this and also file an issue to track this.

@github-actions
Copy link

github-actions bot commented Dec 9, 2022

This functionality has been released in v3.35.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

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 Jan 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants