F5Networks / f5-azure-arm-templates

Azure Resource Manager Templates for quickly deploying BIG-IP services in Azure
84 stars 118 forks source link

numberOfExternalIps is not valid #90

Closed ArtiomL closed 5 years ago

ArtiomL commented 6 years ago

Description

Unable to deploy template. Setting any value to numberOfExternalIps (tried 1, 2 and 3) results in the following error:

Error creating deployment: resources.DeploymentsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidTemplate" Message="Deployment template validation failed: 'The provided value for the template parameter 'numberOfExternalIps' at line '1' and column '5876' is not valid.'."

Template

supported/standalone/3nic/existing-stack/byol

Severity Level

For bugs, enter the bug severity level. Do not set any labels.

Severity: 3

jsevedge commented 6 years ago

It looks like you might be deploying via CLI or orchestration?

If so i would ensure that (1, 2 or 3) is not being passed as a string as the ARM template is expecting an integer.

If that does not fix it, which specific template are you using?

ArtiomL commented 6 years ago

I'm using Terraform, and the value is an integer in my config: https://github.com/ArtiomL/f5-terraform/blob/master/cfg/azure/dev/bigip.tf

Template: https://raw.githubusercontent.com/F5Networks/f5-azure-arm-templates/master/supported/standalone/3nic/existing-stack/byol/azuredeploy.json

I will try to deploy directly.

jsevedge commented 6 years ago

Ah, this is a known issue with terraform not supporting certain data types, including ints. https://github.com/terraform-providers/terraform-provider-azurerm/issues/34

This can be solved on the F5 side in the interim by manually changing the template parameters to use a string instead of an integer, however having it cast as a type int allows us to optionally use some additional ARM template features (such as minValue/maxValue). We have also considered making that change in the shipped templates themselves across the board but have thus far held off on doing so.

ArtiomL commented 6 years ago

Got it. Thank you!

jsevedge commented 5 years ago

Closing this issue out as workaround was provided and this should ideally be fixed within terraform itself (see above terraform provider issue). Please feel free to reopen or open a new issue if additional questions arise.