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

Issue deploying to Azure Gov #500

Closed
Tukeyz opened this issue Nov 2, 2021 · 7 comments
Closed

Issue deploying to Azure Gov #500

Tukeyz opened this issue Nov 2, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@Tukeyz
Copy link

Tukeyz commented Nov 2, 2021

I have no idea as i dont know coding, but i am getting this error

"[parameters('hubVirtualNetworkDiagnosticsMetrics')]"
The template has specified this parameter as type 'array', but the default value is specified as type 'string'. This template may not deploy correctly.
Unable to parse value to type 'array'. The value must be a valid JSON array.
how do i resolve this error message

@Tukeyz Tukeyz added the question Further information is requested label Nov 2, 2021
@brooke-hamilton
Copy link
Contributor

brooke-hamilton commented Nov 4, 2021

@Turkeyz thank you for the feedback! Can you add more detail that will help us reproduce the issue? For example, steps to reproduce and/or a pointer to any instructions you were following, and input data you used.

@techdawg70
Copy link

techdawg70 commented Nov 10, 2021

Hi Brooke - this error is seen when a user navigates the github repo to the Command-Line-Deployment section then clicks the "Deploy" link under the "Deploy with Bicep (recommended)" option block. From here the user clicks the button "Deploy to Azure Gov" which redirects the user to their Az Gov tenant -> custom deployment template for MLZ. This error is seen against the following arears -> Identity Virtual Network Diagnostics Logs, Identity Virtual Network Diagnostics Metrics, Identity Network Security Group Rules, Identity Network Security Group Diagnostics Logs, Identity Network Security Group Diagnostics Metrics, Identity Subnet Service Endpoints, Operations Virtual Network Diagnostics Logs, Operations Virtual Network Diagnostics Metrics, Operations Network Security Group Rules, Operations Network Security Group Diagnostics Logs, Operations Network Security Group Diagnostics Metrics, Operations Subnet Service Endpoints, Shared Services Virtual Network Diagnostics Logs, Shared Services Virtual Network Diagnostics Metrics, Shared Services Network Security Group Rules, Shared Services Network Security Group Diagnostics Logs, Shared Services Network Security Group Diagnostics Metrics, Shared Services Subnet Service Endpoints

@brooke-hamilton
Copy link
Contributor

Thanks for the additional info. I will take a look. 💯

@brooke-hamilton brooke-hamilton changed the title Need Help with any issue I am facing Issue deploying to Azure Gov Nov 11, 2021
@brooke-hamilton brooke-hamilton added the bug Something isn't working label Nov 11, 2021
@brooke-hamilton brooke-hamilton self-assigned this Nov 11, 2021
@glennmusa
Copy link
Contributor

glennmusa commented Nov 11, 2021

It appears the custom deployment template doesn't support parsing shared array parameters:

The template has specified this parameter as type 'array', but the default value is specified as type 'string'. This template may not deploy correctly.

image

Manually modifying the form value to remove the string " characters from the inputs that trigger this validation allows the deployment to begin:

image

Odd behavior given this value is defaulted as an array type here:

param operationsSubnetServiceEndpoints array = hubSubnetServiceEndpoints

and read from this value, which is also an array:

param hubSubnetServiceEndpoints array = [
{
service: 'Microsoft.Storage'
}
]

but what is generated in the ARM template that the custom deployment uses is a string value:

"operationsSubnetServiceEndpoints": {
"type": "array",
"defaultValue": "[parameters('hubSubnetServiceEndpoints')]"
},

you can see the value it references is not a string, but starts with [ an array type:

"hubSubnetServiceEndpoints": {
"type": "array",
"defaultValue": [
{
"service": "Microsoft.Storage"
}
]
},

will investigate and propose a fix

@brooke-hamilton brooke-hamilton removed their assignment Nov 11, 2021
@brooke-hamilton
Copy link
Contributor

For now we have removed the Azure portal templates from the main branch until we get a fix. The command-line deployments using the AZ CLI are not affected by this issue. See PR #516

@brooke-hamilton brooke-hamilton removed the question Further information is requested label Nov 15, 2021
@brooke-hamilton
Copy link
Contributor

#482 is a similar issue and is being addressed too.

@brooke-hamilton
Copy link
Contributor

This bug will be resolved with #482, which is currently in progress.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants