seal-io / walrus

Walrus is an open-source application management platform based on IaC tools including OpenTofu, Terraform and others. It helps platform engineers build golden paths for developers and empowers developers with self-service capabilities.
Apache License 2.0
427 stars 48 forks source link

Failed to create resources when the variable value is of type string but has a default value set as a number #2003

Closed Finenyaco closed 9 months ago

Finenyaco commented 9 months ago

Describe the bug

Steps to reproduce

  1. Add a template with source https://github.com/terraform-aws-modules/terraform-aws-vpc.
  2. Using the template to create a resource and do not change the default.

Result

  1. Failed to create.

    image
  2. Check the ui schema.

    image
  3. Check the api post request. Doesn't convert values from int type to string type.

    image

Expected behavior

When a variable value is defined as a string type and a numerical input is provided, it automatically converts the number to a string type before submission.

Environment

Additional context Add any other context about the problem here.

Check the template variable definition.

image
Finenyaco commented 9 months ago

Similar issue:

Using template https://github.com/terraform-aws-modules/terraform-aws-batch.

Test Results:

  1. Failed to create resources.

    image
  2. Submitting a string-type variable with a default value of "true" as a boolean type.

    image
  3. Check the ui schema.

    image
  4. Check the template variable definition:

    image
Finenyaco commented 9 months ago

Environment

Test Result:

image