From 69f9e17f1e2ef33ae11b8f96e49a8b4af4d23bdb Mon Sep 17 00:00:00 2001 From: Gokul Premraj Date: Tue, 15 Jun 2021 17:26:43 -0400 Subject: [PATCH 1/5] Add support for bicep files in TS --- .vscode/launch.json | 12 ++++++++- .../cli/command_modules/resource/custom.py | 25 ++++++++++++++----- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c2a47d74891..48819c75f1c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,17 @@ "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ - "--help" + "ts", + "create", + "--name", + "testTS", + "--resource-group", + "Gokul-TestRG4", + "--template-file", + "C:/Users/Gopremra/Downloads/storage.bicep", + //"C://Users/Gopremra/Desktop/footest.json", + "--version", + "1" ], "console": "integratedTerminal", "debugOptions": [ diff --git a/src/azure-cli/azure/cli/command_modules/resource/custom.py b/src/azure-cli/azure/cli/command_modules/resource/custom.py index ac631560266..e2fe08e1b14 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/custom.py +++ b/src/azure-cli/azure/cli/command_modules/resource/custom.py @@ -1852,9 +1852,16 @@ def create_template_spec(cmd, resource_group_name, name, template_file=None, loc if template_file: from azure.cli.command_modules.resource._packing_engine import (pack) - packed_template = pack(cmd, template_file) - input_template = getattr(packed_template, 'RootTemplate') - artifacts = getattr(packed_template, 'Artifacts') + if is_bicep_file(template_file): + template_content = run_bicep_command(["build", "--stdout", template_file]) + input_content = _remove_comments_from_json(template_content, file_path=template_file) + input_template = json.loads(json.dumps(input_content)) + artifacts = [] + else: + packed_template = pack(cmd, template_file) + input_template = getattr(packed_template, 'RootTemplate') + artifacts = getattr(packed_template, 'Artifacts') + if ui_form_definition_file: ui_form_definition_content = _remove_comments_from_json(read_file_content(ui_form_definition_file)) @@ -1896,9 +1903,15 @@ def update_template_spec(cmd, resource_group_name=None, name=None, template_spec existing_template, artifacts, input_ui_form_definition = None, None, None if template_file: from azure.cli.command_modules.resource._packing_engine import (pack) - packed_template = pack(cmd, template_file) - input_template = getattr(packed_template, 'RootTemplate') - artifacts = getattr(packed_template, 'Artifacts') + if is_bicep_file(template_file): + template_content = run_bicep_command(["build", "--stdout", template_file]) + input_content = _remove_comments_from_json(template_content, file_path=template_file) + input_template = json.loads(json.dumps(input_content)) + artifacts = [] + else: + packed_template = pack(cmd, template_file) + input_template = getattr(packed_template, 'RootTemplate') + artifacts = getattr(packed_template, 'Artifacts') if ui_form_definition_file: ui_form_definition_content = _remove_comments_from_json(read_file_content(ui_form_definition_file)) From 63461f7f7d9ea31cbf1704dc54aa8861bbf6d0d1 Mon Sep 17 00:00:00 2001 From: Gokul Premraj Date: Thu, 15 Jul 2021 18:08:33 -0400 Subject: [PATCH 2/5] Add tests --- .vscode/launch.json | 12 +- .../cli/command_modules/resource/custom.py | 1 - .../test_create_template_specs_bicep.yaml | 265 ++++++++++++++++++ .../resource/tests/latest/test_resource.py | 26 ++ 4 files changed, 292 insertions(+), 12 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml diff --git a/.vscode/launch.json b/.vscode/launch.json index 48819c75f1c..c2a47d74891 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,17 +9,7 @@ "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ - "ts", - "create", - "--name", - "testTS", - "--resource-group", - "Gokul-TestRG4", - "--template-file", - "C:/Users/Gopremra/Downloads/storage.bicep", - //"C://Users/Gopremra/Desktop/footest.json", - "--version", - "1" + "--help" ], "console": "integratedTerminal", "debugOptions": [ diff --git a/src/azure-cli/azure/cli/command_modules/resource/custom.py b/src/azure-cli/azure/cli/command_modules/resource/custom.py index e2fe08e1b14..d1aff178ebc 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/custom.py +++ b/src/azure-cli/azure/cli/command_modules/resource/custom.py @@ -1862,7 +1862,6 @@ def create_template_spec(cmd, resource_group_name, name, template_file=None, loc input_template = getattr(packed_template, 'RootTemplate') artifacts = getattr(packed_template, 'Artifacts') - if ui_form_definition_file: ui_form_definition_content = _remove_comments_from_json(read_file_content(ui_form_definition_file)) input_ui_form_definition = json.loads(json.dumps(ui_form_definition_content)) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml new file mode 100644 index 00000000000..dea25cda291 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml @@ -0,0 +1,265 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts create + Connection: + - keep-alive + ParameterSetName: + - -g -n -v -l -f --description --version-description + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0?api-version=2021-05-01 + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0'' + under resource group ''cli_test_template_specs000001'' was not found. For + more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '354' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Jul 2021 19:03:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts create + Connection: + - keep-alive + ParameterSetName: + - -g -n -v -l -f --description --version-description + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002'' + under resource group ''cli_test_template_specs000001'' was not found. For + more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '341' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Jul 2021 19:03:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: '{"location": "westus", "tags": {}, "properties": {"description": "AzCLI + test root template spec from bicep"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts create + Connection: + - keep-alive + Content-Length: + - '109' + Content-Type: + - application/json + ParameterSetName: + - -g -n -v -l -f --description --version-description + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 + response: + body: + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"description\": \"AzCLI test root template spec from bicep\"\r\n + \ },\r\n \"systemData\": {\r\n \"createdBy\": \"gopremra@microsoft.com\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T19:03:42.0043059Z\",\r\n + \ \"lastModifiedBy\": \"gopremra@microsoft.com\",\r\n \"lastModifiedByType\": + \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T19:03:42.0043059Z\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002\",\r\n + \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-create-template-spec000002\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '801' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Jul 2021 19:03:42 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: '{"location": "westus", "tags": {}, "properties": {"description": "AzCLI + test version of root template spec from bicep", "linkedTemplates": [], "mainTemplate": + {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": + "0.4.63.48766", "templateHash": "17278007198180777144"}}, "functions": [], "variables": + {"storageAccountName": "[format(''store{0}'', uniqueString(resourceGroup().id))]"}, + "resources": [{"type": "Microsoft.Storage/storageAccounts", "apiVersion": "2019-04-01", + "name": "[variables(''storageAccountName'')]", "location": "westus2", "sku": + {"name": "Standard_LRS"}, "kind": "StorageV2", "properties": {}}]}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts create + Connection: + - keep-alive + Content-Length: + - '740' + Content-Type: + - application/json + ParameterSetName: + - -g -n -v -l -f --description --version-description + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0?api-version=2021-05-01 + response: + body: + string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": + {\r\n \"description\": \"AzCLI test version of root template spec from + bicep\",\r\n \"mainTemplate\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\r\n + \ \"contentVersion\": \"1.0.0.0\",\r\n \"metadata\": {\r\n \"_generator\": + {\r\n \"name\": \"bicep\",\r\n \"version\": \"0.4.63.48766\",\r\n + \ \"templateHash\": \"17278007198180777144\"\r\n }\r\n },\r\n + \ \"functions\": [],\r\n \"variables\": {\r\n \"storageAccountName\": + \"[format('store{0}', uniqueString(resourceGroup().id))]\"\r\n },\r\n + \ \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n + \ \"apiVersion\": \"2019-04-01\",\r\n \"name\": \"[variables('storageAccountName')]\",\r\n + \ \"location\": \"westus2\",\r\n \"sku\": {\r\n \"name\": + \"Standard_LRS\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n + \ \"properties\": {}\r\n }\r\n ]\r\n }\r\n },\r\n + \ \"systemData\": {\r\n \"createdBy\": \"gopremra@microsoft.com\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T19:03:43.799383Z\",\r\n + \ \"lastModifiedBy\": \"gopremra@microsoft.com\",\r\n \"lastModifiedByType\": + \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T19:03:43.799383Z\"\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0\",\r\n + \ \"type\": \"Microsoft.Resources/templateSpecs/versions\",\r\n \"name\": + \"1.0\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1638' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Jul 2021 19:03:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - ts delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --template-spec --yes + User-Agent: + - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 15 Jul 2021 19:03:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index 9c866fb819d..158571fed83 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -770,6 +770,32 @@ def test_create_template_specs(self, resource_group, resource_group_location): self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') self.cmd('ts delete --template-spec {template_spec_id} --yes') + @ResourceGroupPreparer(name_prefix='cli_test_template_specs', location='westus') + def test_create_template_specs_bicep(self, resource_group, resource_group_location): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + template_spec_name = self.create_random_name('cli-test-create-template-spec', 60) + self.kwargs.update({ + 'template_spec_name': template_spec_name, + 'tf': os.path.join(curr_dir, 'storage_account_deploy.bicep').replace('\\', '\\\\'), + 'resource_group_location': resource_group_location, + 'description': '"AzCLI test root template spec from bicep"', + 'version_description': '"AzCLI test version of root template spec from bicep"', + }) + + result = self.cmd('ts create -g {rg} -n {template_spec_name} -v 1.0 -l {resource_group_location} -f "{tf}" --description {description} --version-description {version_description}', checks=[ + self.check('location', "westus"), + self.check('mainTemplate.functions', []), + self.check("name", "1.0") + ]).get_output_in_json() + + with self.assertRaises(IncorrectUsageError) as err: + self.cmd('ts create --name {template_spec_name} -g {rg} -l {resource_group_location} --template-file "{tf}"') + self.assertTrue("please provide --template-uri if --query-string is specified" in str(err.exception)) + + # clean up + self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') + self.cmd('ts delete --template-spec {template_spec_id} --yes') + @ResourceGroupPreparer(name_prefix='cli_test_template_specs', location='westus') def test_create_template_specs_with_artifacts(self, resource_group, resource_group_location): curr_dir = os.path.dirname(os.path.realpath(__file__)) From 558eb55a3de1a153bdfe9ab92148f6ca087a91ab Mon Sep 17 00:00:00 2001 From: Gokul Premraj Date: Thu, 15 Jul 2021 18:40:58 -0400 Subject: [PATCH 3/5] re-record test --- .../test_create_template_specs_bicep.yaml | 118 +++++++++++++++--- 1 file changed, 102 insertions(+), 16 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml index dea25cda291..24f7e46fee2 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml @@ -13,7 +13,7 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0?api-version=2021-05-01 response: @@ -29,7 +29,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 15 Jul 2021 19:03:37 GMT + - Thu, 15 Jul 2021 22:38:59 GMT expires: - '-1' pragma: @@ -43,6 +43,92 @@ interactions: status: code: 404 message: Not Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://api.github.com/repos/Azure/bicep/releases/latest + response: + body: + string: '{"url":"https://api.github.com/repos/Azure/bicep/releases/44131194","assets_url":"https://api.github.com/repos/Azure/bicep/releases/44131194/assets","upload_url":"https://uploads.github.com/repos/Azure/bicep/releases/44131194/assets{?name,label}","html_url":"https://github.com/Azure/bicep/releases/tag/v0.4.63","id":44131194,"author":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"node_id":"MDc6UmVsZWFzZTQ0MTMxMTk0","tag_name":"v0.4.63","target_commitish":"main","name":"v0.4.63","draft":false,"prerelease":false,"created_at":"2021-06-04T19:35:26Z","published_at":"2021-06-05T01:30:09Z","assets":[{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091029","id":38091029,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDI5","name":"Azure.Bicep.CommandLine.linux-x64.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":18419987,"download_count":5,"created_at":"2021-06-04T20:53:36Z","updated_at":"2021-06-04T20:53:38Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.CommandLine.linux-x64.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091036","id":38091036,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDM2","name":"Azure.Bicep.CommandLine.osx-x64.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":18652945,"download_count":4,"created_at":"2021-06-04T20:53:46Z","updated_at":"2021-06-04T20:53:47Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.CommandLine.osx-x64.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091020","id":38091020,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDIw","name":"Azure.Bicep.CommandLine.win-x64.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":18594407,"download_count":126,"created_at":"2021-06-04T20:53:27Z","updated_at":"2021-06-04T20:53:28Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.CommandLine.win-x64.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091000","id":38091000,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDAw","name":"Azure.Bicep.MSBuild.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":38079,"download_count":4,"created_at":"2021-06-04T20:53:04Z","updated_at":"2021-06-04T20:53:04Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.MSBuild.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091001","id":38091001,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDAx","name":"Azure.Bicep.MSBuild.0.4.63.snupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":6630,"download_count":9,"created_at":"2021-06-04T20:53:06Z","updated_at":"2021-06-04T20:53:06Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.MSBuild.0.4.63.snupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091007","id":38091007,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDA3","name":"bicep-langserver.zip","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/zip","state":"uploaded","size":8092032,"download_count":18,"created_at":"2021-06-04T20:53:10Z","updated_at":"2021-06-04T20:53:11Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-langserver.zip"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090948","id":38090948,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTQ4","name":"bicep-linux-musl-x64","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":41200541,"download_count":3375,"created_at":"2021-06-04T20:52:21Z","updated_at":"2021-06-04T20:52:23Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-linux-musl-x64"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090923","id":38090923,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTIz","name":"bicep-linux-x64","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":41384549,"download_count":59670,"created_at":"2021-06-04T20:52:08Z","updated_at":"2021-06-04T20:52:10Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-linux-x64"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090965","id":38090965,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTY1","name":"bicep-osx-x64","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":42176089,"download_count":1027,"created_at":"2021-06-04T20:52:31Z","updated_at":"2021-06-04T20:52:33Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-osx-x64"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090979","id":38090979,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTc5","name":"bicep-setup-win-x64.exe","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/x-msdownload","state":"uploaded","size":16078472,"download_count":1692,"created_at":"2021-06-04T20:52:53Z","updated_at":"2021-06-04T20:52:54Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-setup-win-x64.exe"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090983","id":38090983,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTgz","name":"bicep-win-x64.exe","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/x-msdownload","state":"uploaded","size":40044000,"download_count":22866,"created_at":"2021-06-04T20:52:56Z","updated_at":"2021-06-04T20:53:03Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-win-x64.exe"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091009","id":38091009,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDA5","name":"vscode-bicep.vsix","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/vsix","state":"uploaded","size":11971041,"download_count":101,"created_at":"2021-06-04T20:53:18Z","updated_at":"2021-06-04T20:53:19Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/vscode-bicep.vsix"}],"tarball_url":"https://api.github.com/repos/Azure/bicep/tarball/v0.4.63","zipball_url":"https://api.github.com/repos/Azure/bicep/zipball/v0.4.63","body":"## + Highlights\r\n\r\n* Fixed a critical perf issue on macOS (#3044)\r\n\r\n## + Bug fixes and features\r\n\r\nBicep team:\r\n* Fix Bicep playground (#2991)\r\n* + Fix span calculation in ValidateSnippetCompletionAfterPlaceholderReplacements + (#3021)\r\n* Put param/var names in linter messages where \"Unused\" (#2899)\r\n* + Make DTC error messages more informative (#2941)\r\n* Block completions at + positions where nodes should not be inserted (Part II) (#2995)\r\n* Port arm + tools snippets - part 6 (#2782)\r\n\r\n## Docs, examples, and snippet updates\r\n\r\nBicep + team:\r\n* edits for ttk use (#2989)\r\n\r\n@ChristopherGLewis\r\n* Additional + samples for the 000 level syntax examples (#2896)\r\n\r\n@MCKLMT\r\n* Update + homebrew to v0.4.1 (#2971)\r\n\r\n@Strepto\r\n* Remove duplicate ''get'' from + keyvault snippet (v2) (#2967)\r\n\r\n@slavizh\r\n* improves sql-database-with-management + example (#2970)\r\n\r\n@tw3lveparsecs\r\n* 301-log-analytics-with-datasources-solutions + (#2932)","reactions":{"url":"https://api.github.com/repos/Azure/bicep/releases/44131194/reactions","total_count":14,"+1":0,"-1":0,"laugh":1,"hooray":0,"confused":0,"heart":7,"rocket":6,"eyes":0}}' + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + access-control-expose-headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, + X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, + X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, + Sunset + cache-control: + - public, max-age=60, s-maxage=60 + content-length: + - '19340' + content-security-policy: + - default-src 'none' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 15 Jul 2021 22:39:04 GMT + etag: + - W/"51ba782e4991c5d3dff1eedee2f30cfaf339173e69710b23203eb020aeba4200" + last-modified: + - Sat, 05 Jun 2021 01:30:09 GMT + referrer-policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + server: + - GitHub.com + strict-transport-security: + - max-age=31536000; includeSubdomains; preload + transfer-encoding: + - chunked + vary: + - Accept, Accept-Encoding, Accept, X-Requested-With + x-content-type-options: + - nosniff + x-frame-options: + - deny + x-github-media-type: + - github.v3; format=json + x-github-request-id: + - E726:79C5:AC60F0:1895C9F:60F0B907 + x-ratelimit-limit: + - '60' + x-ratelimit-remaining: + - '59' + x-ratelimit-reset: + - '1626392344' + x-ratelimit-resource: + - core + x-ratelimit-used: + - '1' + x-xss-protection: + - '0' + status: + code: 200 + message: OK - request: body: null headers: @@ -57,7 +143,7 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 response: @@ -73,7 +159,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 15 Jul 2021 19:03:39 GMT + - Thu, 15 Jul 2021 22:39:06 GMT expires: - '-1' pragma: @@ -106,7 +192,7 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 response: @@ -114,9 +200,9 @@ interactions: string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"description\": \"AzCLI test root template spec from bicep\"\r\n \ },\r\n \"systemData\": {\r\n \"createdBy\": \"gopremra@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T19:03:42.0043059Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T22:39:09.0309765Z\",\r\n \ \"lastModifiedBy\": \"gopremra@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T19:03:42.0043059Z\"\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T22:39:09.0309765Z\"\r\n \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-create-template-spec000002\"\r\n}" headers: @@ -127,7 +213,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 15 Jul 2021 19:03:42 GMT + - Thu, 15 Jul 2021 22:39:09 GMT expires: - '-1' pragma: @@ -169,7 +255,7 @@ interactions: ParameterSetName: - -g -n -v -l -f --description --version-description User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0?api-version=2021-05-01 response: @@ -188,21 +274,21 @@ interactions: \"Standard_LRS\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n \ \"properties\": {}\r\n }\r\n ]\r\n }\r\n },\r\n \ \"systemData\": {\r\n \"createdBy\": \"gopremra@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T19:03:43.799383Z\",\r\n + \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T22:39:10.9010563Z\",\r\n \ \"lastModifiedBy\": \"gopremra@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T19:03:43.799383Z\"\r\n },\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0\",\r\n + \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T22:39:10.9010563Z\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0\",\r\n \ \"type\": \"Microsoft.Resources/templateSpecs/versions\",\r\n \"name\": \"1.0\"\r\n}" headers: cache-control: - no-cache content-length: - - '1638' + - '1640' content-type: - application/json; charset=utf-8 date: - - Thu, 15 Jul 2021 19:03:43 GMT + - Thu, 15 Jul 2021 22:39:11 GMT expires: - '-1' pragma: @@ -234,7 +320,7 @@ interactions: ParameterSetName: - --template-spec --yes User-Agent: - - AZURECLI/2.24.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) + - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 response: @@ -246,7 +332,7 @@ interactions: content-length: - '0' date: - - Thu, 15 Jul 2021 19:03:46 GMT + - Thu, 15 Jul 2021 22:39:13 GMT expires: - '-1' pragma: From 4e8473397c57624fcdc13f456c6e8b9d28211ad9 Mon Sep 17 00:00:00 2001 From: Gokul Premraj Date: Tue, 27 Jul 2021 11:10:05 -0700 Subject: [PATCH 4/5] Changed new test to a live test --- .../test_create_template_specs_bicep.yaml | 351 ------------------ .../resource/tests/latest/test_resource.py | 26 ++ 2 files changed, 26 insertions(+), 351 deletions(-) delete mode 100644 src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml deleted file mode 100644 index 24f7e46fee2..00000000000 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/recordings/test_create_template_specs_bicep.yaml +++ /dev/null @@ -1,351 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ts create - Connection: - - keep-alive - ParameterSetName: - - -g -n -v -l -f --description --version-description - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0?api-version=2021-05-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0'' - under resource group ''cli_test_template_specs000001'' was not found. For - more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '354' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 15 Jul 2021 22:38:59 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python-requests/2.22.0 - method: GET - uri: https://api.github.com/repos/Azure/bicep/releases/latest - response: - body: - string: '{"url":"https://api.github.com/repos/Azure/bicep/releases/44131194","assets_url":"https://api.github.com/repos/Azure/bicep/releases/44131194/assets","upload_url":"https://uploads.github.com/repos/Azure/bicep/releases/44131194/assets{?name,label}","html_url":"https://github.com/Azure/bicep/releases/tag/v0.4.63","id":44131194,"author":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"node_id":"MDc6UmVsZWFzZTQ0MTMxMTk0","tag_name":"v0.4.63","target_commitish":"main","name":"v0.4.63","draft":false,"prerelease":false,"created_at":"2021-06-04T19:35:26Z","published_at":"2021-06-05T01:30:09Z","assets":[{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091029","id":38091029,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDI5","name":"Azure.Bicep.CommandLine.linux-x64.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":18419987,"download_count":5,"created_at":"2021-06-04T20:53:36Z","updated_at":"2021-06-04T20:53:38Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.CommandLine.linux-x64.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091036","id":38091036,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDM2","name":"Azure.Bicep.CommandLine.osx-x64.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":18652945,"download_count":4,"created_at":"2021-06-04T20:53:46Z","updated_at":"2021-06-04T20:53:47Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.CommandLine.osx-x64.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091020","id":38091020,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDIw","name":"Azure.Bicep.CommandLine.win-x64.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":18594407,"download_count":126,"created_at":"2021-06-04T20:53:27Z","updated_at":"2021-06-04T20:53:28Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.CommandLine.win-x64.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091000","id":38091000,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDAw","name":"Azure.Bicep.MSBuild.0.4.63.nupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":38079,"download_count":4,"created_at":"2021-06-04T20:53:04Z","updated_at":"2021-06-04T20:53:04Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.MSBuild.0.4.63.nupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091001","id":38091001,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDAx","name":"Azure.Bicep.MSBuild.0.4.63.snupkg","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":6630,"download_count":9,"created_at":"2021-06-04T20:53:06Z","updated_at":"2021-06-04T20:53:06Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/Azure.Bicep.MSBuild.0.4.63.snupkg"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091007","id":38091007,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDA3","name":"bicep-langserver.zip","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/zip","state":"uploaded","size":8092032,"download_count":18,"created_at":"2021-06-04T20:53:10Z","updated_at":"2021-06-04T20:53:11Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-langserver.zip"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090948","id":38090948,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTQ4","name":"bicep-linux-musl-x64","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":41200541,"download_count":3375,"created_at":"2021-06-04T20:52:21Z","updated_at":"2021-06-04T20:52:23Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-linux-musl-x64"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090923","id":38090923,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTIz","name":"bicep-linux-x64","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":41384549,"download_count":59670,"created_at":"2021-06-04T20:52:08Z","updated_at":"2021-06-04T20:52:10Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-linux-x64"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090965","id":38090965,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTY1","name":"bicep-osx-x64","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":42176089,"download_count":1027,"created_at":"2021-06-04T20:52:31Z","updated_at":"2021-06-04T20:52:33Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-osx-x64"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090979","id":38090979,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTc5","name":"bicep-setup-win-x64.exe","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/x-msdownload","state":"uploaded","size":16078472,"download_count":1692,"created_at":"2021-06-04T20:52:53Z","updated_at":"2021-06-04T20:52:54Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-setup-win-x64.exe"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38090983","id":38090983,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkwOTgz","name":"bicep-win-x64.exe","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/x-msdownload","state":"uploaded","size":40044000,"download_count":22866,"created_at":"2021-06-04T20:52:56Z","updated_at":"2021-06-04T20:53:03Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/bicep-win-x64.exe"},{"url":"https://api.github.com/repos/Azure/bicep/releases/assets/38091009","id":38091009,"node_id":"MDEyOlJlbGVhc2VBc3NldDM4MDkxMDA5","name":"vscode-bicep.vsix","label":"","uploader":{"login":"majastrz","id":22460039,"node_id":"MDQ6VXNlcjIyNDYwMDM5","avatar_url":"https://avatars.githubusercontent.com/u/22460039?v=4","gravatar_id":"","url":"https://api.github.com/users/majastrz","html_url":"https://github.com/majastrz","followers_url":"https://api.github.com/users/majastrz/followers","following_url":"https://api.github.com/users/majastrz/following{/other_user}","gists_url":"https://api.github.com/users/majastrz/gists{/gist_id}","starred_url":"https://api.github.com/users/majastrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majastrz/subscriptions","organizations_url":"https://api.github.com/users/majastrz/orgs","repos_url":"https://api.github.com/users/majastrz/repos","events_url":"https://api.github.com/users/majastrz/events{/privacy}","received_events_url":"https://api.github.com/users/majastrz/received_events","type":"User","site_admin":false},"content_type":"application/vsix","state":"uploaded","size":11971041,"download_count":101,"created_at":"2021-06-04T20:53:18Z","updated_at":"2021-06-04T20:53:19Z","browser_download_url":"https://github.com/Azure/bicep/releases/download/v0.4.63/vscode-bicep.vsix"}],"tarball_url":"https://api.github.com/repos/Azure/bicep/tarball/v0.4.63","zipball_url":"https://api.github.com/repos/Azure/bicep/zipball/v0.4.63","body":"## - Highlights\r\n\r\n* Fixed a critical perf issue on macOS (#3044)\r\n\r\n## - Bug fixes and features\r\n\r\nBicep team:\r\n* Fix Bicep playground (#2991)\r\n* - Fix span calculation in ValidateSnippetCompletionAfterPlaceholderReplacements - (#3021)\r\n* Put param/var names in linter messages where \"Unused\" (#2899)\r\n* - Make DTC error messages more informative (#2941)\r\n* Block completions at - positions where nodes should not be inserted (Part II) (#2995)\r\n* Port arm - tools snippets - part 6 (#2782)\r\n\r\n## Docs, examples, and snippet updates\r\n\r\nBicep - team:\r\n* edits for ttk use (#2989)\r\n\r\n@ChristopherGLewis\r\n* Additional - samples for the 000 level syntax examples (#2896)\r\n\r\n@MCKLMT\r\n* Update - homebrew to v0.4.1 (#2971)\r\n\r\n@Strepto\r\n* Remove duplicate ''get'' from - keyvault snippet (v2) (#2967)\r\n\r\n@slavizh\r\n* improves sql-database-with-management - example (#2970)\r\n\r\n@tw3lveparsecs\r\n* 301-log-analytics-with-datasources-solutions - (#2932)","reactions":{"url":"https://api.github.com/repos/Azure/bicep/releases/44131194/reactions","total_count":14,"+1":0,"-1":0,"laugh":1,"hooray":0,"confused":0,"heart":7,"rocket":6,"eyes":0}}' - headers: - accept-ranges: - - bytes - access-control-allow-origin: - - '*' - access-control-expose-headers: - - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, - X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, - X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, - Sunset - cache-control: - - public, max-age=60, s-maxage=60 - content-length: - - '19340' - content-security-policy: - - default-src 'none' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 15 Jul 2021 22:39:04 GMT - etag: - - W/"51ba782e4991c5d3dff1eedee2f30cfaf339173e69710b23203eb020aeba4200" - last-modified: - - Sat, 05 Jun 2021 01:30:09 GMT - referrer-policy: - - origin-when-cross-origin, strict-origin-when-cross-origin - server: - - GitHub.com - strict-transport-security: - - max-age=31536000; includeSubdomains; preload - transfer-encoding: - - chunked - vary: - - Accept, Accept-Encoding, Accept, X-Requested-With - x-content-type-options: - - nosniff - x-frame-options: - - deny - x-github-media-type: - - github.v3; format=json - x-github-request-id: - - E726:79C5:AC60F0:1895C9F:60F0B907 - x-ratelimit-limit: - - '60' - x-ratelimit-remaining: - - '59' - x-ratelimit-reset: - - '1626392344' - x-ratelimit-resource: - - core - x-ratelimit-used: - - '1' - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ts create - Connection: - - keep-alive - ParameterSetName: - - -g -n -v -l -f --description --version-description - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 - response: - body: - string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002'' - under resource group ''cli_test_template_specs000001'' was not found. For - more details please go to https://aka.ms/ARMResourceNotFoundFix"}}' - headers: - cache-control: - - no-cache - content-length: - - '341' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 15 Jul 2021 22:39:06 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - gateway - status: - code: 404 - message: Not Found -- request: - body: '{"location": "westus", "tags": {}, "properties": {"description": "AzCLI - test root template spec from bicep"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ts create - Connection: - - keep-alive - Content-Length: - - '109' - Content-Type: - - application/json - ParameterSetName: - - -g -n -v -l -f --description --version-description - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 - response: - body: - string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": - {\r\n \"description\": \"AzCLI test root template spec from bicep\"\r\n - \ },\r\n \"systemData\": {\r\n \"createdBy\": \"gopremra@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T22:39:09.0309765Z\",\r\n - \ \"lastModifiedBy\": \"gopremra@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T22:39:09.0309765Z\"\r\n - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002\",\r\n - \ \"type\": \"Microsoft.Resources/templateSpecs\",\r\n \"name\": \"cli-test-create-template-spec000002\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '801' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 15 Jul 2021 22:39:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: '{"location": "westus", "tags": {}, "properties": {"description": "AzCLI - test version of root template spec from bicep", "linkedTemplates": [], "mainTemplate": - {"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", "metadata": {"_generator": {"name": "bicep", "version": - "0.4.63.48766", "templateHash": "17278007198180777144"}}, "functions": [], "variables": - {"storageAccountName": "[format(''store{0}'', uniqueString(resourceGroup().id))]"}, - "resources": [{"type": "Microsoft.Storage/storageAccounts", "apiVersion": "2019-04-01", - "name": "[variables(''storageAccountName'')]", "location": "westus2", "sku": - {"name": "Standard_LRS"}, "kind": "StorageV2", "properties": {}}]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ts create - Connection: - - keep-alive - Content-Length: - - '740' - Content-Type: - - application/json - ParameterSetName: - - -g -n -v -l -f --description --version-description - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0?api-version=2021-05-01 - response: - body: - string: "{\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": - {\r\n \"description\": \"AzCLI test version of root template spec from - bicep\",\r\n \"mainTemplate\": {\r\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\r\n - \ \"contentVersion\": \"1.0.0.0\",\r\n \"metadata\": {\r\n \"_generator\": - {\r\n \"name\": \"bicep\",\r\n \"version\": \"0.4.63.48766\",\r\n - \ \"templateHash\": \"17278007198180777144\"\r\n }\r\n },\r\n - \ \"functions\": [],\r\n \"variables\": {\r\n \"storageAccountName\": - \"[format('store{0}', uniqueString(resourceGroup().id))]\"\r\n },\r\n - \ \"resources\": [\r\n {\r\n \"type\": \"Microsoft.Storage/storageAccounts\",\r\n - \ \"apiVersion\": \"2019-04-01\",\r\n \"name\": \"[variables('storageAccountName')]\",\r\n - \ \"location\": \"westus2\",\r\n \"sku\": {\r\n \"name\": - \"Standard_LRS\"\r\n },\r\n \"kind\": \"StorageV2\",\r\n - \ \"properties\": {}\r\n }\r\n ]\r\n }\r\n },\r\n - \ \"systemData\": {\r\n \"createdBy\": \"gopremra@microsoft.com\",\r\n - \ \"createdByType\": \"User\",\r\n \"createdAt\": \"2021-07-15T22:39:10.9010563Z\",\r\n - \ \"lastModifiedBy\": \"gopremra@microsoft.com\",\r\n \"lastModifiedByType\": - \"User\",\r\n \"lastModifiedAt\": \"2021-07-15T22:39:10.9010563Z\"\r\n - \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002/versions/1.0\",\r\n - \ \"type\": \"Microsoft.Resources/templateSpecs/versions\",\r\n \"name\": - \"1.0\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1640' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 15 Jul 2021 22:39:11 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - ts delete - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - --template-spec --yes - User-Agent: - - AZURECLI/2.26.0 azsdk-python-azure-mgmt-resource/18.0.0 Python/3.8.10 (Windows-10-10.0.19043-SP0) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_template_specs000001/providers/Microsoft.Resources/templateSpecs/cli-test-create-template-spec000002?api-version=2021-05-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 15 Jul 2021 22:39:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index 99868e00c38..1fed3fed267 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -3785,6 +3785,32 @@ def test_tenent_level_deployment_with_bicep(self): self.check('properties.provisioningState', 'Succeeded') ]) + @ResourceGroupPreparer(name_prefix='cli_test_template_specs', location='westus') + def test_create_template_specs_bicep(self, resource_group, resource_group_location): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + template_spec_name = self.create_random_name('cli-test-create-template-spec', 60) + self.kwargs.update({ + 'template_spec_name': template_spec_name, + 'tf': os.path.join(curr_dir, 'storage_account_deploy.bicep').replace('\\', '\\\\'), + 'resource_group_location': resource_group_location, + 'description': '"AzCLI test root template spec from bicep"', + 'version_description': '"AzCLI test version of root template spec from bicep"', + }) + + result = self.cmd('ts create -g {rg} -n {template_spec_name} -v 1.0 -l {resource_group_location} -f "{tf}" --description {description} --version-description {version_description}', checks=[ + self.check('location', "westus"), + self.check('mainTemplate.functions', []), + self.check("name", "1.0") + ]).get_output_in_json() + + with self.assertRaises(IncorrectUsageError) as err: + self.cmd('ts create --name {template_spec_name} -g {rg} -l {resource_group_location} --template-file "{tf}"') + self.assertTrue("please provide --template-uri if --query-string is specified" in str(err.exception)) + + # clean up + self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') + self.cmd('ts delete --template-spec {template_spec_id} --yes') + def _remove_bicep_cli(self): bicep_cli_path = self._get_bicep_cli_path() if os.path.isfile(bicep_cli_path): From 20ace2fb307b75edc42af0ede8feb4b178c266c5 Mon Sep 17 00:00:00 2001 From: Gokul Premraj Date: Tue, 27 Jul 2021 11:38:59 -0700 Subject: [PATCH 5/5] Changed new test to a live test #2 --- .../resource/tests/latest/test_resource.py | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py index 1fed3fed267..3f1904ca8bc 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource.py @@ -815,32 +815,6 @@ def test_create_template_specs(self, resource_group, resource_group_location): self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') self.cmd('ts delete --template-spec {template_spec_id} --yes') - @ResourceGroupPreparer(name_prefix='cli_test_template_specs', location='westus') - def test_create_template_specs_bicep(self, resource_group, resource_group_location): - curr_dir = os.path.dirname(os.path.realpath(__file__)) - template_spec_name = self.create_random_name('cli-test-create-template-spec', 60) - self.kwargs.update({ - 'template_spec_name': template_spec_name, - 'tf': os.path.join(curr_dir, 'storage_account_deploy.bicep').replace('\\', '\\\\'), - 'resource_group_location': resource_group_location, - 'description': '"AzCLI test root template spec from bicep"', - 'version_description': '"AzCLI test version of root template spec from bicep"', - }) - - result = self.cmd('ts create -g {rg} -n {template_spec_name} -v 1.0 -l {resource_group_location} -f "{tf}" --description {description} --version-description {version_description}', checks=[ - self.check('location', "westus"), - self.check('mainTemplate.functions', []), - self.check("name", "1.0") - ]).get_output_in_json() - - with self.assertRaises(IncorrectUsageError) as err: - self.cmd('ts create --name {template_spec_name} -g {rg} -l {resource_group_location} --template-file "{tf}"') - self.assertTrue("please provide --template-uri if --query-string is specified" in str(err.exception)) - - # clean up - self.kwargs['template_spec_id'] = result['id'].replace('/versions/1.0', '') - self.cmd('ts delete --template-spec {template_spec_id} --yes') - @ResourceGroupPreparer(name_prefix='cli_test_template_specs', location='westus') def test_create_template_specs_with_artifacts(self, resource_group, resource_group_location): curr_dir = os.path.dirname(os.path.realpath(__file__))