Azure / azure-cli

Azure Command-Line Interface
MIT License
4.04k stars 3.01k forks source link

az maintenance assignment create-or-update-subscription command giving unexpected generic error #28415

Open MDavisF opened 9 months ago

MDavisF commented 9 months ago

Describe the bug

Hi team, previously I have been able to manage the dynamic scope of my maintenance configuration via this command, however I have tried again in the last 2 days and am running into an error, even when using the exact same command and variable values that have worked previously. I have also tested this in two separate subscriptions and am seeing this issue in both.

Example command: az maintenance assignment create-or-update-subscription --maintenance-configuration-id $maintID --name $maintName --subscription $subID The variable values are certainly correct strings. See image attached, I have also tried to adjust the parameters specified however that does not seem to help.

I believe configuring dynamic scopes is not possible with Azure Powershell, so that only leaves Azure CLI for me to try to automate this. Could someone please advise if I need to adjust the command or need to be aware of anything else?

Thank you!

azmaint

Related command

az maintenance assignment create-or-update-subscription

Errors

az maintenance assignment create-or-update-subscription --maintenance-configuration-id $maintID --name $maintName --subscription $subID
This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus (None) An error has occurred. Code: None Message: An error has occurred.

Issue script & Debug output

PS /home/matthew> az maintenance assignment create-or-update-subscription --maintenance-configuration-id $maintID --name $maintName --subscription $subID --debug
cli.knack.cli: Command arguments: ['maintenance', 'assignment', 'create-or-update-subscription', '--maintenance-configuration-id', '/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Maintenance/maintenanceConfigurations/REDACTED', '--name', 'REDACTED', '--subscription', 'REDACTED', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f4605c541f0>, <function OutputProducer.on_global_arguments at 0x7f4605b6ed30>, <function CLIQuery.on_global_arguments at 0x7f4605b06310>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'maintenance': ['azext_maintenance'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: Total (0) 0.000 0 0 cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next'] cli.azure.cli.core: Loading extensions: cli.azure.cli.core: Name Load Time Groups Commands Directory cli.azure.cli.core: ai-examples 0.251 1 1 /usr/lib/python3.9/site-packages/azure-cli-extensions/ai-examples cli.azure.cli.core: maintenance 0.104 6 23 /home/matthew/.azure/cliextensions/maintenance cli.azure.cli.core: Total (2) 0.356 7 24
cli.azure.cli.core: Loaded 7 groups, 24 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : maintenance assignment create-or-update-subscription cli.azure.cli.core: Command table: maintenance assignment create cli.azure.cli.core: remaining : or-update-subscription cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f4604fad940>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/matthew/.azure/commands/2024-02-20.22-56-41.maintenance_assignment_create-or-update-subscription.2458.log'. az_command_data_logger: command args: maintenance assignment create-or-update-subscription --maintenance-configuration-id {} --name {} --subscription {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f4604f52550>] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f4604f7a550>, <function register_cache_arguments..add_cache_arguments at 0x7f4604ecb430>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f4605b6edc0>, <function CLIQuery.handle_query_parameter at 0x7f4605b063a0>, <function register_ids_argument..parse_ids_arguments at 0x7f4604ecb3a0>] az_command_data_logger: extension name: maintenance az_command_data_logger: extension version: 1.5.0 This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342 urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2031 msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://management.core.windows.net/'} cli.azure.cli.core.auth.adal_authentication: MSIAuthenticationWrapper.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342 urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2031 msrestazure.azure_active_directory: MSI: Retrieving a token from http://localhost:50342/oauth2/token, with payload {'resource': 'https://management.core.windows.net/'} cli.azure.cli.core.auth.adal_authentication: Normalize expires_on: '1708470521' -> 1708470521 cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01' cli.azure.cli.core.sdk.policies: Request method: 'PUT' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '217' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '4fac092e-d043-11ee-ac0c-00155d10f8e5' cli.azure.cli.core.sdk.policies: 'CommandName': 'maintenance assignment create-or-update-subscription' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--maintenance-configuration-id --name --subscription --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.57.0 (RPM) (AAZ) azsdk-python-core/1.28.0 Python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0' cli.azure.cli.core.sdk.policies: 'Authorization': '' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"properties": {"maintenanceConfigurationId": "/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Maintenance/maintenanceConfigurations/REDACTED"}} urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01 HTTP/1.1" 500 36 cli.azure.cli.core.sdk.policies: Response status: 500 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '36' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199' cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '141dbab5-1764-4fb1-ab1a-01a0b7648d47' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SOUTHEASTASIA:20240220T225644Z:141dbab5-1764-4fb1-ab1a-01a0b7648d47' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 220C7876FC0D4673A1B6F2F49AE959F5 Ref B: MAA201060514031 Ref C: 2024-02-20T22:56:42Z' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 20 Feb 2024 22:56:43 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"Message":"An error has occurred."} cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01' cli.azure.cli.core.sdk.policies: Request method: 'PUT' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '217' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '4fac092e-d043-11ee-ac0c-00155d10f8e5' cli.azure.cli.core.sdk.policies: 'CommandName': 'maintenance assignment create-or-update-subscription' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--maintenance-configuration-id --name --subscription --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.57.0 (RPM) (AAZ) azsdk-python-core/1.28.0 Python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0' cli.azure.cli.core.sdk.policies: 'Authorization': '' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"properties": {"maintenanceConfigurationId": "/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Maintenance/maintenanceConfigurations/REDACTED"}} urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01 HTTP/1.1" 500 36 cli.azure.cli.core.sdk.policies: Response status: 500 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '36' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199' cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'a303f376-1e69-431d-91b0-9983cb59c4d4' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SOUTHEASTASIA:20240220T225646Z:a303f376-1e69-431d-91b0-9983cb59c4d4' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 46D82DAB0E354452B045C9E26A8A5311 Ref B: MAA201060514031 Ref C: 2024-02-20T22:56:44Z' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 20 Feb 2024 22:56:45 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"Message":"An error has occurred."} cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01' cli.azure.cli.core.sdk.policies: Request method: 'PUT' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '217' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '4fac092e-d043-11ee-ac0c-00155d10f8e5' cli.azure.cli.core.sdk.policies: 'CommandName': 'maintenance assignment create-or-update-subscription' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--maintenance-configuration-id --name --subscription --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.57.0 (RPM) (AAZ) azsdk-python-core/1.28.0 Python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0' cli.azure.cli.core.sdk.policies: 'Authorization': '' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"properties": {"maintenanceConfigurationId": "/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Maintenance/maintenanceConfigurations/REDACTED"}} urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01 HTTP/1.1" 500 36 cli.azure.cli.core.sdk.policies: Response status: 500 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '36' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1198' cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '2ea360a0-8251-4304-b817-6c97b395ea4a' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SOUTHEASTASIA:20240220T225649Z:2ea360a0-8251-4304-b817-6c97b395ea4a' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: E6D4F6C65BB846DFB5AF91E6A3CA263F Ref B: MAA201060514031 Ref C: 2024-02-20T22:56:48Z' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 20 Feb 2024 22:56:48 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"Message":"An error has occurred."} cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01' cli.azure.cli.core.sdk.policies: Request method: 'PUT' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'Content-Length': '217' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '4fac092e-d043-11ee-ac0c-00155d10f8e5' cli.azure.cli.core.sdk.policies: 'CommandName': 'maintenance assignment create-or-update-subscription' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--maintenance-configuration-id --name --subscription --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.57.0 (RPM) (AAZ) azsdk-python-core/1.28.0 Python/3.9.14 (Linux-5.10.102.2-microsoft-standard-x86_64-with-glibc2.35) cloud-shell/1.0' cli.azure.cli.core.sdk.policies: 'Authorization': '' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"properties": {"maintenanceConfigurationId": "/subscriptions/REDACTED/resourceGroups/REDACTED/providers/Microsoft.Maintenance/maintenanceConfigurations/REDACTED"}} urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/REDACTED/providers/Microsoft.Maintenance/configurationAssignments/REDACTED?api-version=2023-04-01 HTTP/1.1" 500 36 cli.azure.cli.core.sdk.policies: Response status: 500 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '36' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '' cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199' cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '8837324e-2e29-4124-aea3-abf4a38e71c2' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SOUTHEASTASIA:20240220T225653Z:8837324e-2e29-4124-aea3-abf4a38e71c2' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 4732E4A4C11F42038C1CDD2D1A07B444 Ref B: MAA201060514031 Ref C: 2024-02-20T22:56:52Z' cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 20 Feb 2024 22:56:52 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"Message":"An error has occurred."} cli.azure.cli.core.azclierror: Traceback (most recent call last): File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 664, in execute raise ex File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 729, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 698, in _run_job result = cmd_copy(params) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/aaz/_command.py", line 155, in call return self._handler(*args, **kwargs) File "/home/matthew/.azure/cliextensions/maintenance/azext_maintenance/aaz/latest/maintenance/assignment/_create_or_update_subscription.py", line 34, in _handler self._execute_operations() File "/home/matthew/.azure/cliextensions/maintenance/azext_maintenance/aaz/latest/maintenance/assignment/_create_or_update_subscription.py", line 137, in _execute_operations self.ConfigurationAssignmentsForSubscriptionsCreateOrUpdate(ctx=self.ctx)() File "/home/matthew/.azure/cliextensions/maintenance/azext_maintenance/aaz/latest/maintenance/assignment/_create_or_update_subscription.py", line 161, in call return self.on_error(session.http_response) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/aaz/_operation.py", line 332, in on_error raise HttpResponseError(response=response, error_format=error_format) azure.core.exceptions.HttpResponseError: (None) An error has occurred. Code: None Message: An error has occurred.

cli.azure.cli.core.azclierror: (None) An error has occurred. Code: None Message: An error has occurred. az_command_data_logger: (None) An error has occurred. Code: None Message: An error has occurred. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f4604fadb80>] az_command_data_logger: exit code: 1 cli.main: Command ran in 12.155 seconds (init: 0.239, invoke: 11.916) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 3804 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/usr/bin/python3.9 /usr/lib/az/lib/python3.9/site-packages/azure/cli/telemetry/init.py /home/matthew/.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

This command has previously succeeded and configured an existing maintenance configuration to have the specified subscription as the dynamic scope.

Environment Summary

azure-cli 2.57.0

core 2.57.0 telemetry 1.1.0

Additional context

No response

yonzhan commented 9 months ago

Thank you for opening this issue, we will look into it.

pcsmbetlem commented 8 months ago

After troubleshooting on this problem between Bicep and CLI command's as a workaround, it seems that previously a filter location was not needed. Maybe not mandatory, but if you add a location filter to your code now, it seems to be working again. I actually don't want to use a location filter, but maybe there is an issue with the SDK that prevents me from doing so.

Solution: add "--filter-locations " to your code

freekbrouwer commented 8 months ago

I just want to add, im also having this issue.

but the filter locations did not work for me . Below you can find my command

        az maintenance assignment create-or-update-subscription `
            --subscription $subscriptionId `
            --maintenance-configuration-id $mcResourceID `
            --name $filterTag `
            --filter-os-types windows linux `
            --filter-tags "{PatchCycle:[$filterTag]}" `
            --filter-tags-operator All `
            --filter-locations 'westeurope' `
            --location westeurope `
            --debug

Im using the above in a for loop that loops through all subscriptions that i have.

pcsmbetlem commented 8 months ago

@freekbrouwer your "--location westeurope" should be set to 'global' since it's a subscription-level deployment. Please let us know if that helps anything.

freekbrouwer commented 8 months ago

@freekbrouwer your "--location westeurope" should be set to 'global' since it's a subscription-level deployment. Please let us know if that helps anything.

Well that fixed it.! Was i reading over it for about 20 times or is the documentation for this lacking?

Thanks any way!

pcsmbetlem commented 8 months ago

Sometimes I wander between Bicep and CLI, to find the boundaries and accepted values for my templates. So, if I recall it correctly it was the CLI raising an error saying 'westeurope' wasn't valid, but the 'global' is. Documentation could be more complete indeed. Especially when it comes to advanced configuration of guest OS maintenance/patching!

MDavisF commented 8 months ago

@pcsmbetlem Thank you sir! That has managed to allow this command to work for me once again. Same as you, ideally I would not want to have a location filter, but given we know which regions we expect our resources to be in, this isn't a big deal for us to add. I really appreciate you posting in here to let us know :) Have a great week!