After weeks of successful deployment of KafkaCluster from AZ command line using ARM template, recently its not working anymore and no changes happened to ARM template
or to parameter
. after running the AZ deployment command
it throws exceptions.
az deployment group create --resource-group XX --template-spec "/subscriptions/xxx/versions/1.0" --parameters ./environment/deploy/kafka/parameters.json --debug # to debug
After running the command, the template of Kafka is being printed with the right parameters, where at the end of the log there are some exceptions:
...
"type": "Microsoft.Resources/templateSpecs/versions",
"name": "1.0"
}
azure.cli.core.util.handle_exception is called with an exception:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 784, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/resource/custom.py", line 511, in deploy_arm_template_at_resource_group
no_prompt=no_prompt, template_spec=template_spec)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/resource/custom.py", line 538, in _deploy_arm_template_at_resource_group
no_prompt=no_prompt, template_spec=template_spec)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/resource/custom.py", line 830, in _prepare_deployment_properties_unmodified
template_obj = show_resource(cmd=cmd, resource_ids=[template_spec]).properties['template']
KeyError: 'template'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 103, in handle_template_based_exception
raise CLIError(ex.inner_exception.error.message)
AttributeError: 'KeyError' object has no attribute 'inner_exception'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 709, in _run_job
cmd_copy.exception_handler(ex)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 105, in handle_template_based_exception
raise CLIError(ex)
knack.util.CLIError: 'template'
What could be wrong here ? Any suggestions is welcomed.