F5Networks / f5-aws-cloudformation-v2

AWS Cloudformation Templates for quickly deploying BIG-IP services in AWS
13 stars 22 forks source link

Using included quickstart-parameters.json results in invalid type for parameter error #10

Closed JeffGiroux closed 2 years ago

JeffGiroux commented 2 years ago

Do you already have an issue opened with F5 support?

GitHub Issues are consistently monitored by F5 staff, but should be considered as best-effort only and you should not expect to receive the same level of response as provided by F5 Support. Please open a case with F5 if this is a critical issue.

Description

Running the quickstart template results in error if you utilize the provided parameter's file in the repo. Why? Not sure, but it might be the way AWS cli interprets the values.

error

Parameter validation failed:
Invalid type for parameter Parameters[12].ParameterValue, value: 1, type: <class 'int'>, valid types: <class 'str'>
Invalid type for parameter Parameters[13].ParameterValue, value: 3, type: <class 'int'>, valid types: <class 'str'>
Invalid type for parameter Parameters[14].ParameterValue, value: 4, type: <class 'int'>, valid types: <class 'str'>

When looking at the quickstart-parameters.json file, you will see the following parameters with a value of integer...not string. The template file also shows those same parameters as type integer with allowed values.

quickstart-parameters.json

  {
    "ParameterKey": "numAzs",
    "ParameterValue": 1
  },
  {
    "ParameterKey": "numNics",
    "ParameterValue": 3
  },
  {
    "ParameterKey": "numSubnets",
    "ParameterValue": 4
  },

If you run the template with the parameters and value for the items above, you will get error.

Template

https://github.com/F5Networks/f5-aws-cloudformation-v2/tree/main/examples/quickstart

Severity Level

3

JeffGiroux commented 2 years ago

Workaround

If using the parameters file, you must add quotes around the integer numbers.

  {
    "ParameterKey": "numAzs",
    "ParameterValue": "1"
  },
  {
    "ParameterKey": "numNics",
    "ParameterValue": "3"
  },
  {
    "ParameterKey": "numSubnets",
    "ParameterValue": "4"
  },
shyawnkarim commented 2 years ago

This is actually a known issue and the work to fix it has been completed. The fix for this, internal ID ESECLDTPLT-2970, will come with the next release.

shyawnkarim commented 2 years ago

Closing.

The fix for this bug was included with Release 2.0.0.0.