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

Checkboxes in the UI don't toggle boolean variables #213

Closed
glennmusa opened this issue May 19, 2021 · 1 comment · Fixed by #218
Closed

Checkboxes in the UI don't toggle boolean variables #213

glennmusa opened this issue May 19, 2021 · 1 comment · Fixed by #218
Labels
bug Something isn't working

Comments

@glennmusa
Copy link
Contributor

Description

When trying to create the create_bastion_jumpbox form field to support toggling the creation of Bastion and Windows VM Jumpboxes on a deployment, I'm unable to override the default value of true, the browser always renders an unchecked checkbox, and the checkbox state seems to have no effect on the variable value as the bastion host and jumpbox are always deployed.

Steps to Reproduce

  1. Add a boolean that defaults to true to the UI in *.front.json
  2. Deploy the UI
  3. Deploy the configuration

Expected behavior

The checkbox state toggles the corresponding terraform variable true/false

Actual behavior

The checkbox state is irrelevant and the corresponding terraform variable value is always true.

Snippets

If I set up a saca-hub.front.json like this:

{
  "varname": "create_bastion_jumpbox",
  "type": "boolean",
  "default_val": true,
  "description": "Create a bastion host and jumpbox VM?",
  "options": []
},

and saca-hub.orig.tfvars.json like this:

  "create_bastion_jumpbox": false,

and the saca-hub/variables.tf like this:

variable "create_bastion_jumpbox" {
  description = "Create a bastion host and jumpbox VM?"
  type        = bool
  default     = true
}

the UI will render this:

image

and no matter if I toggle that checkbox or not, the resources always treat the variable as if it is truthy:

cd exec_output && cat exec.txt
...
module.bastion-host[0].azurerm_subnet.bastion_host_subnet: Creating...
...
@glennmusa glennmusa added the bug Something isn't working label May 19, 2021
@glennmusa
Copy link
Contributor Author

cc @Breanna-Stryker

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

Successfully merging a pull request may close this issue.

1 participant