Skip to main content

Check out Port for yourselfย 

Toggle (Boolean)

Toggle is a basic boolean input that has one of two possible values - true and false.
In Port, this input type is represented by a switch that can be toggled on or off.

๐Ÿ’ก Common toggle usageโ€‹

This input type can be used to store any true/false gate, for example:

  • Is environment locked for deployments
  • Should environment perform nightly shutdown
  • Does service handle PII
  • Is environment public

In the live demo self-service hub page, we can see the Delete Repo action whose Confirm input is a toggle input. ๐ŸŽฌ

API definitionโ€‹

{
"myBooleanInput": {
"title": "My boolean input",
"icon": "My icon",
"description": "My boolean input",
"type": "boolean",
"default": true
}
}

Check out Port's API reference to learn more.

Terraform definitionโ€‹

resource "port_action" "myAction" {
# ...action properties
user_properties = {
boolean_props = {
myBooleanInput = {
title = "My boolean input"
description = "My boolean input"
default = true
}
}
}
}