You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing string parameters that resemble scientific notation (e.g., "51e7") through the Porter Terraform mixin, they are being incorrectly converted to their decimal representation (e.g., "510000000"). This happens even when the parameters are properly defined as type: string in the Porter manifest and are quoted in the command line.
Steps to Reproduce
Porter.yaml
---
schemaVersion: 1.0.0name: porter-scientific-testversion: 0.1.0description: "A test bundle to demonstrate scientific notation string conversion issue"dockerfile: Dockerfile.tmplregistry: azuretreparameters:
- name: test_idtype: stringdescription: "Test ID that looks like scientific notation"mixins:
- exec
- terraform:
clientVersion: 1.10.3install:
- terraform:
description: "Test parameter handling"vars:
test_id: ${ bundle.parameters.test_id }
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Changes to Outputs:
+ test_id_output = "510000000"
You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
test_id_output = "510000000"
execution completed successfully!
The text was updated successfully, but these errors were encountered:
jonnyry
changed the title
String parameters being interpreted as scientific notation in Terraform mixin
String parameters being interpreted as scientific notation
Jan 16, 2025
Issue Description
When passing string parameters that resemble scientific notation (e.g., "51e7") through the Porter Terraform mixin, they are being incorrectly converted to their decimal representation (e.g., "510000000"). This happens even when the parameters are properly defined as type: string in the Porter manifest and are quoted in the command line.
Steps to Reproduce
Porter.yaml
main.tf
Running the test
Output
The text was updated successfully, but these errors were encountered: