Skip to main content

Boolean

Boolean is a primitive data type that has one of two possible values - true and false.

💡 Common boolean usage​

The boolean property 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

API definition​

{
"myBooleanProp": {
"title": "My boolean",
"icon": "My icon",
"description": "My boolean property",
"type": "boolean",
"default": true
}
}

Check out Port's API reference to learn more.

Terraform definition​

resource "port_blueprint" "myBlueprint" {
# ...blueprint properties
properties = {
boolean_props = {
"myBooleanProp" = {
title = "My boolean"
required = true
}
}
}
}

Pulumi definition​

"""A Python Pulumi program"""

import pulumi
from port_pulumi import Blueprint,BlueprintPropertiesArgs,BlueprintPropertiesBooleanPropsArgs

blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
boolean_props={
"myBooleanProp": BlueprintPropertiesBooleanPropsArgs(
title="My boolean",
required=True,
)
}
),
relations={},
)