-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
- Refactor and add correct API constraints.
#22204
azurerm_automation_software_update_configuration
- Refactor and add correct API constraints.
#22204
Conversation
autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="{\"Message\":\"The request is invalid.\",\"ModelState\":{\"softwareUpdateConfiguration.properties.scheduleInfo.advancedSchedule.monthlyOccurrences\":[\"More than one Monthly Occurrence is not supported\"]}}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from one comment ☁️
internal/services/automation/automation_software_update_configuration_resource_test.go
Outdated
Show resolved
Hide resolved
@@ -451,7 +623,7 @@ provider "azurerm" { | |||
|
|||
resource "azurerm_resource_group" "test" { | |||
name = "acctestRG-auto-%[1]d" | |||
location = "West US" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a random location will cause test failure, because the required log analytics workspace location is not the same as the automation account's location in EastUS
and EastUS2
.
Error as below;
Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Error - chosen Azure Automation does not have a Log Analytics workspace linked for operation to succeed. To know which regions are supported for linking, see our documentation at: https://aka.ms/Automation-Region-Mapping
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Adds schema validation and restrictions based on API limits / requirements:
operating_system
has been deprecated and is now controlled by the presence of either alinux
orwindows
block.linux
orwindows
block must now be present. This is a requirement of the API, so is a non-breakingOptional
toRequired
change.monthly_occurrence
- blocks limited to1
due to:duration
now defaults toPT2H
as per the service.schedule
block is now limited to1
, to match the API limit.schedule
block is nowRequired
to match the API specification. The API rejects requests that do not specify this block, with at least afrequency
value.frequency
is now aRequired
property of theschedule
block. This is to match the minimum requirements of the API.pre_task
blocks are now limited to1
to match the APIpost_task
blocks are now limited to1
to match the APIcloses #21970