Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bicepparam does not handle multibyte characters correctly #23246

Closed
Ypsilon09 opened this issue Nov 6, 2023 · 5 comments · Fixed by #23409
Closed

bicepparam does not handle multibyte characters correctly #23246

Ypsilon09 opened this issue Nov 6, 2023 · 5 comments · Fixed by #23409
Labels
ARM - Templates bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.

Comments

@Ypsilon09
Copy link

Ypsilon09 commented Nov 6, 2023

Description

Setting multibyte characters in the bicepparam file parameter will result in garbled characters.

main.bicep

targetScope = 'subscription'

param tag1 string

var tag2 = '日本語テスト_var'

resource symbolicname 'Microsoft.Resources/resourceGroups@2022-09-01' = {
  name: 'rg-bicepparam-test'
  location: 'japaneast'
  tags: {
    tagName1: tag1
    tagName2: tag2
    tagName3: '日本語テスト_literal'
  }
  properties: {}
}

main.bicepparam

using 'main.bicep'
param tag1 = '日本語テスト_param'
Get-AzDeploymentWhatIfResult -TemplateFile ./main.bicep -TemplateParameterFile ./main.bicepparam -Location japaneast

Result:

  + resourceGroups/rg-bicepparam-test [2022-09-01]

      apiVersion:    "2022-09-01"
      id:            "/subscriptions/xxxxxxx/resourceGroups/rg-bicepparam-test"
      location:      "japaneast"
      name:          "rg-bicepparam-test"
      tags.tagName1: "譌・譛ャ隱槭ユ繧ケ繝・param"
      tags.tagName2: "日本語テスト_var"
      tags.tagName3: "日本語テスト_literal"
      type:          "Microsoft.Resources/resourceGroups"

Expected Result:

  + resourceGroups/rg-bicepparam-test [2022-09-01]

      apiVersion:    "2022-09-01"
      id:            "/subscriptions/xxxxxxx/resourceGroups/rg-bicepparam-test"
      location:      "japaneast"
      name:          "rg-bicepparam-test"
      tags.tagName1: "日本語テスト_param"
      tags.tagName2: "日本語テスト_var"
      tags.tagName3: "日本語テスト_literal"
      type:          "Microsoft.Resources/resourceGroups"

Deploying using ARM Json parameter file works:

bicep build-params ./main.bicepparam

ARM Json Parameter file:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "tag1": {
      "value": "日本語テスト_param"
    }
  }
}
Get-AzDeploymentWhatIfResult -TemplateFile ./main.bicep -TemplateParameterFile ./main.json -Location japaneast

Result:

  + resourceGroups/rg-bicepparam-test [2022-09-01]

      apiVersion:    "2022-09-01"
      id:            "/subscriptions/xxxxxxx/resourceGroups/rg-bicepparam-test"
      location:      "japaneast"
      name:          "rg-bicepparam-test"
      tags.tagName1: "日本語テスト_param"
      tags.tagName2: "日本語テスト_var"
      tags.tagName3: "日本語テスト_literal"
      type:          "Microsoft.Resources/resourceGroups"

The results did not change depending on the presence or absence of the BOM in the bicepparam file

Issue script & Debug output

Get-AzDeploymentWhatIfResult -TemplateFile ./main.bicep -TemplateParameterFile ./main.bicepparam -Location japaneast -debug


Result:

VERBOSE: Using Bicep v0.23.1
VERBOSE: Calling Bicep with arguments: build "D:\Temp\bicepparam\main.bicep" --outdir "C:\Users\xxx\AppData\Local\Temp\75a5b890-b8d0-4eff-ad96-d9b6e71d58f9"
VERBOSE:
WARNING: D:\Temp\bicepparam\main.bicep(9,13) : Warning no-hardcoded-location: A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'japaneast' [https://aka.ms/bicep/linter/no-hardcoded-location]

DEBUG: 15:54:28 - GetAzureSubscriptionDeploymentWhatIfResultCmdlet begin processing with ParameterSet 'ByTemplateFileAndParameterFile'.
DEBUG: 15:54:28 - using account id 'xxx.onmicrosoft.com'...
DEBUG: 15:54:28 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
Getting the latest status of all resources...DEBUG: [Common.Authentication]: Authenticating using Account: 'xxx.onmicrosoft.com', environment: 'AzureCloud', tenant: 'zzzzz'
DEBUG: 15:54:28 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 15:54:28 - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'zzzzz', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'xxx.onmicrosoft.com'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 6e0249ca-96d0-456f-a0d2-7297887f6b47] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z] Found 3 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z] Returning 3 accounts
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] MSAL MSAL.NetCore with assembly version '4.49.1.0'. CorrelationId(10b52fc1-9819-45e8-8115-8ff2769e9685)
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] LoginHint provided: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] Account provided: True
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] ForceRefresh: False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 10b52fc1-9819-45e8-8115-8ff2769e9685
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured:

DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] === Token Acquisition (SilentRequest) started:
Scopes: https://management.core.windows.net//.default
Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] Access token is not expired. Returning the found cache entry. [Current time (11/06/2023 06:54:28) - Expiration Time (11/06/2023 07:22:32 +00:00) - Extended Expiration Time (11/06/2023 07:22:32 +00:00)]
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Microsoft Windows 10.0.22631 [2023-11-06 06:54:28Z - 10b52fc1-9819-45e8-8115-8ff2769e9685] AT expiration time: 2023/11/06 7:22:32 +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-11-06T07:22:32.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'zzzzz', UserId: 'xxx.onmicrosoft.com'
VERBOSE: Using Bicep v0.23.1
VERBOSE: Calling Bicep with arguments: build-params "D:\Temp\bicepparam\main.bicepparam" --stdout
WARNING: D:\Temp\bicepparam\main.bicep(9,13) : Warning no-hardcoded-location: A resource location should not use a hard-coded string or variable value. Please use a parameter value, an expression, or the string 'global'. Found: 'japaneast' [https://aka.ms/bicep/linter/no-hardcoded-location]

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/yyyyy/providers/Microsoft.Resources/deployments/ce4d8802-0df1-4475-bd2d-34cbb5ece822/whatIf?api-version=2022-09-01

Headers:
Accept-Language : en-US
x-ms-client-request-id : c8c9c1a1-548e-4d8c-baf6-5b302e14ab56

Body:
{
"location": "japaneast",
"properties": {
"whatIfSettings": {
"resultFormat": "FullResourcePayloads"
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.23.1.45101",
"templateHash": "1932607385514387539"
}
},
"parameters": {
"tag1": {
"type": "string"
}
},
"variables": {
"tag2": "日本語テスト_var"
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2022-09-01",
"name": "rg-bicepparam-test",
"location": "japaneast",
"tags": {
"tagName1": "[parameters('tag1')]",
"tagName2": "[variables('tag2')]",
"tagName3": "日本語テスト_literal"
},
"properties": {}
}
]
},
"parameters": {
"tag1": {
"value": "譌・譛ャ隱槭ユ繧ケ繝・param"
}
},
"mode": "Incremental"
}
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Accepted

Headers:
Cache-Control : no-cache
Pragma : no-cache
Location : https://management.azure.com/subscriptions/yyyyy/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnRXaGF0SWZKb2ItLUNFNEQ4ODAyOjJEMERGMToyRDQ0NzU6MkRCRDJEOjJEMzRDQkI1RUNFODIyLTJGQzMyQzYzOjJEQ0FBOToyRDRFNUU6MkQ4MEM2OjJEN0Q1NTczRjQxN0REIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2022-09-01&t=638348505009488147&c=MIIHHjCCBgagAwIBAgITfwI8YE7TFpH4swTJAgAEAjxgTjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTI0ODMyWhcNMjQxMDI2MTI0ODMyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOfk7s1AnKyUqxJR1tGB1o-bd08yXoGVmNHQbpQb9IWlVS7htLxnfaUT083PrTqMEBOB9OS4hyPlFX-ApR1pomKdOD1y0gioSkZG_vgzN2wtFSBJWYWnrCl3xq-Tt9kIsLmZ7FZ-JBOTPKr8rSmKzm4L0NIsVf6UNGZOPdsZpFYEXOeyjshEO6PpPevESOM8rWMDozQTl1HzkC0gPrg5DGhYsJJe5HDWO8h7FZD5HFOCbb225KnGWZppoK08q2QpTgIP8P7CvjQnoGz2CnVSlOOMvuZXjhUTObsuZWO8XdgF04CkgZhq94b4Ej__vi4D1mZ2x9zRlrEMA1MEIfV5sN0CAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxU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UUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAGraIc9hsqUGKcUfGRNlRfK3ussZT-LVHk7wo_N16Hnjq6O3kEOh1mdMNH-uYhMOeqXAg8ua2Co_Ryny1cSbWYBExXVxH2mDnGrRA0cOMEZVd7HGLhG7AvGMFDaxPDge9P_W4kaoMoN3Q3UcKwfZ3H94NyavU0Pk8lqY294YOkd-IgerbhZiIsIR1xE4QglniwVZCNl85WS-QtiJ2urgjIQ6mIdfAQb1mUbHPMh8i3z_av1Wjp5eOUm3MIA7j9kOWVnCEWM_wzDNrLBl-o3cRuUEdVMzmghLEyrN6p0svczMmPBFkSXArQzjyJpTQfM7UHrhAv7N0cUingZ7xJY8z_M&s=s4WsdmvQ4mx7faIXJndk49WpY37w0UjzPcELwLLjmbnrZ2vZlUzHlNhrwRIAZH79jpBbIC1P5GQ755-Ibylg2v2MzdtANF359nw1rnWhdG6dzShjPK07iBCY4-njicW2zS-mN5R2GZLIsVmVK3GJmKWfEe07fNveF3cnIaiwKeqsFTouk0I1sWLgIXB4bOWIoMkGFTtxrvnL9OcjDbd78iThdxcYfwnJlPm-d6MOIeaH_mhQuu2pd9fNubXEt2cvILtnue4wDJ_TT4sV2X98Apnv0zmkBg9lyYYYoEsb-EVZ7m-eLZYnZcY2fUNsUCH6szBFCUy5ZtYs2WOBbZKP8w&h=ZchpydV_EjylbXN6XdNd3-h3SpGP2MenmRRBPuAaj6o
Retry-After : 15
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-request-id : 2fc32c63-caa9-4e5e-80c6-7d5573f417dd
x-ms-correlation-request-id : 2fc32c63-caa9-4e5e-80c6-7d5573f417dd
x-ms-routing-request-id : JAPANEAST:20231106T065500Z:2fc32c63-caa9-4e5e-80c6-7d5573f417dd
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Date : Mon, 06 Nov 2023 06:55:00 GMT

Body:

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/yyyyy/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnRXaGF0SWZKb2ItLUNFNEQ4ODAyOjJEMERGMToyRDQ0NzU6MkRCRDJEOjJEMzRDQkI1RUNFODIyLTJGQzMyQzYzOjJEQ0FBOToyRDRFNUU6MkQ4MEM2OjJEN0Q1NTczRjQxN0REIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2022-09-01&t=638348505009488147&c=MIIHHjCCBgagAwIBAgITfwI8YE7TFpH4swTJAgAEAjxgTjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjMxMTAxMTI0ODMyWhcNMjQxMDI2MTI0ODMyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOfk7s1AnKyUqxJR1tGB1o-bd08yXoGVmNHQbpQb9IWlVS7htLxnfaUT083PrTqMEBOB9OS4hyPlFX-ApR1pomKdOD1y0gioSkZG_vgzN2wtFSBJWYWnrCl3xq-Tt9kIsLmZ7FZ-JBOTPKr8rSmKzm4L0NIsVf6UNGZOPdsZpFYEXOeyjshEO6PpPevESOM8rWMDozQTl1HzkC0gPrg5DGhYsJJe5HDWO8h7FZD5HFOCbb225KnGWZppoK08q2QpTgIP8P7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lyYYYoEsb-EVZ7m-eLZYnZcY2fUNsUCH6szBFCUy5ZtYs2WOBbZKP8w&h=ZchpydV_EjylbXN6XdNd3-h3SpGP2MenmRRBPuAaj6o

Headers:
x-ms-client-request-id : c8c9c1a1-548e-4d8c-baf6-5b302e14ab56

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id : 5dc9d365-925b-4e0b-9067-c2ba603192b2
x-ms-correlation-request-id : 5dc9d365-925b-4e0b-9067-c2ba603192b2
x-ms-routing-request-id : JAPANEAST:20231106T065516Z:5dc9d365-925b-4e0b-9067-c2ba603192b2
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Date : Mon, 06 Nov 2023 06:55:16 GMT

Body:
{
"status": "Succeeded",
"properties": {
"correlationId": "2fc32c63-caa9-4e5e-80c6-7d5573f417dd",
"changes": [
{
"resourceId": "/subscriptions/yyyyy/resourceGroups/rg-bicepparam-test",
"changeType": "Create",
"after": {
"apiVersion": "2022-09-01",
"id": "/subscriptions/yyyyy/resourceGroups/rg-bicepparam-test",
"location": "japaneast",
"name": "rg-bicepparam-test",
"tags": {
"tagName1": "譌・譛ャ隱槭ユ繧ケ繝・param",
"tagName2": "日本語テスト_var",
"tagName3": "日本語テスト_literal"
},
"type": "Microsoft.Resources/resourceGroups"
}
}
]
}
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/yyyyy/operationresults/eyJqb2JJZCI6IkRlcGxveW1lbnRXaGF0SWZKb2ItLUNFNEQ4ODAyOjJEMERGMToyRDQ0NzU6MkRCRDJEOjJEMzRDQkI1RUNFODIyLTJGQzMyQzYzOjJEQ0FBOToyRDRFNUU6MkQ4MEM2OjJEN0Q1NTczRjQxN0REIiwiam9iTG9jYXRpb24iOiJqYXBhbmVhc3QifQ?api-version=2022-09-01&t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NlRfK3ussZT-LVHk7wo_N16Hnjq6O3kEOh1mdMNH-uYhMOeqXAg8ua2Co_Ryny1cSbWYBExXVxH2mDnGrRA0cOMEZVd7HGLhG7AvGMFDaxPDge9P_W4kaoMoN3Q3UcKwfZ3H94NyavU0Pk8lqY294YOkd-IgerbhZiIsIR1xE4QglniwVZCNl85WS-QtiJ2urgjIQ6mIdfAQb1mUbHPMh8i3z_av1Wjp5eOUm3MIA7j9kOWVnCEWM_wzDNrLBl-o3cRuUEdVMzmghLEyrN6p0svczMmPBFkSXArQzjyJpTQfM7UHrhAv7N0cUingZ7xJY8z_M&s=s4WsdmvQ4mx7faIXJndk49WpY37w0UjzPcELwLLjmbnrZ2vZlUzHlNhrwRIAZH79jpBbIC1P5GQ755-Ibylg2v2MzdtANF359nw1rnWhdG6dzShjPK07iBCY4-njicW2zS-mN5R2GZLIsVmVK3GJmKWfEe07fNveF3cnIaiwKeqsFTouk0I1sWLgIXB4bOWIoMkGFTtxrvnL9OcjDbd78iThdxcYfwnJlPm-d6MOIeaH_mhQuu2pd9fNubXEt2cvILtnue4wDJ_TT4sV2X98Apnv0zmkBg9lyYYYoEsb-EVZ7m-eLZYnZcY2fUNsUCH6szBFCUy5ZtYs2WOBbZKP8w&h=ZchpydV_EjylbXN6XdNd3-h3SpGP2MenmRRBPuAaj6o

Headers:
x-ms-client-request-id : c8c9c1a1-548e-4d8c-baf6-5b302e14ab56

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id : 244b3682-ea62-4773-8d5f-515c4b964827
x-ms-correlation-request-id : 244b3682-ea62-4773-8d5f-515c4b964827
x-ms-routing-request-id : JAPANEAST:20231106T065516Z:244b3682-ea62-4773-8d5f-515c4b964827
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Date : Mon, 06 Nov 2023 06:55:16 GMT

Body:
{
"status": "Succeeded",
"properties": {
"correlationId": "2fc32c63-caa9-4e5e-80c6-7d5573f417dd",
"changes": [
{
"resourceId": "/subscriptions/yyyyy/resourceGroups/rg-bicepparam-test",
"changeType": "Create",
"after": {
"apiVersion": "2022-09-01",
"id": "/subscriptions/yyyyy/resourceGroups/rg-bicepparam-test",
"location": "japaneast",
"name": "rg-bicepparam-test",
"tags": {
"tagName1": "譌・譛ャ隱槭ユ繧ケ繝・param",
"tagName2": "日本語テスト_var",
"tagName3": "日本語テスト_literal"
},
"type": "Microsoft.Resources/resourceGroups"
}
}
]
}
}

Note: The result may contain false positive predictions (noise).
You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues.

Resource and property changes are indicated with this symbol:

  • Create

The deployment will update the following scope:

Scope: /subscriptions/yyyyy

  • resourceGroups/rg-bicepparam-test [2022-09-01]

    apiVersion: "2022-09-01"
    id: "/subscriptions/yyyyy/resourceGroups/rg-bicepparam-test"
    location: "japaneast"
    name: "rg-bicepparam-test"
    tags.tagName1: "譌・譛ャ隱槭ユ繧ケ繝・param"
    tags.tagName2: "日本語テスト_var"
    tags.tagName3: "日本語テスト_literal"
    type: "Microsoft.Resources/resourceGroups"

Resource changes: 1 to create.
DEBUG: 15:54:48 - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 15:54:48 - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: AzureQoSEvent: Module: Az.Resources:6.11.2; CommandName: Get-AzDeploymentWhatIfResult; PSVersion: 7.3.9; IsSuccess: True; Duration: 00:00:19.8619586
DEBUG: 15:54:48 - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 15:54:49 - GetAzureSubscriptionDeploymentWhatIfResultCmdlet end processing.

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.9
PSEdition                      Core
GitCommitId                    7.3.9
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version PreRelease Name
---------- ------- ---------- ----
    Script 2.13.1             Az.Accounts
    Script 6.11.2             Az.Resources

Error output

No response

@Ypsilon09 Ypsilon09 added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 6, 2023
@isra-fel
Copy link
Member

isra-fel commented Nov 9, 2023

Thanks for reporting. Let me route this to the deployment team

@isra-fel isra-fel added Service Attention This issue is responsible by Azure service team. ARM - Templates and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 9, 2023
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.

@anthony-c-martin
Copy link
Member

anthony-c-martin commented Nov 13, 2023

@Ypsilon09 please could you run the following and share the output:

bicep build-params ./main.bicepparam --stdout

It would also be helpful if you could share the configured culture settings by running the following:

Get-Culture

@Ypsilon09
Copy link
Author

@anthony-c-martin I ran the code in my environment. Please contact me if you have any other information needed for debugging.

bicep build-params ./main.bicepparam --stdout

Result:

{"parametersJson":"{\n  \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",\n  \"contentVersion\": \"1.0.0.0\",\n  \"parameters\": {\n    \"tag1\": {\n      \"value\": \"日本語テスト_param\"\n    }\n  }\n}","templateJson":"{\n  \"$schema\": \"https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#\",\n  \"contentVersion\": \"1.0.0.0\",\n  \"metadata\": {\n    \"_generator\": {\n      \"name\": \"bicep\",\n      \"version\": \"0.23.1.45101\",\n      \"templateHash\": \"1932607385514387539\"\n    }\n  },\n  \"parameters\": {\n    \"tag1\": {\n      \"type\": \"string\"\n    }\n  },\n  \"variables\": {\n    \"tag2\": \"日本語テスト_var\"\n  },\n  \"resources\": [\n    {\n      \"type\": \"Microsoft.Resources/resourceGroups\",\n      \"apiVersion\": \"2022-09-01\",\n      \"name\": \"rg-bicepparam-test\",\n      \"location\": \"japaneast\",\n      \"tags\": {\n        \"tagName1\": \"[parameters('tag1')]\",\n        \"tagName2\": \"[variables('tag2')]\",\n        \"tagName3\": \"日本語テスト_literal\"\n      },\n      \"properties\": {}\n    }\n  ]\n}","templateSpecId":null} 

The garbled text problem does not seem to be happening.

Get-Culture

Result:

LCID             Name             DisplayName
----             ----             -----------
1041             ja-JP            日本語 (日本)

@anthony-c-martin
Copy link
Member

Thank you! This helped track it down - I've submitted a PR for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM - Templates bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants