Team
Team is a data type used to reference teams that exist in Port.
Common usage
Use Port Team properties to reference teams in your organization, such as:
- The team responsible for operational support.
- Teams that review changes to a service.
- Teams that maintain shared infrastructure.
To define entity ownership, use owning teams. A Port Team property alone does not configure ownership.
API definition
Limit field
When creating a blueprint property of type Team in the UI, use the limit field to define how many values users can select for that property.
In the property creation form, the limit field dropdown provides two options:
- 1 value: Only one value can be selected.
- List of values: Multiple values can be selected.
Selecting the list of values option will set the property's type to array in the JSON definition.
The limit field setting, whether it's 1 value or a list of values, is permanent and cannot be changed after the property is created. If you create a property with a single value limit, you won’t be able to change it later to allow multiple values.
To change the limit configuration after creation:
- Create a new property with the limit field set to a list of values.
- Use the migrate blueprint data feature to insert the data to the new property.
- Delete the old property.
- Rename the new property to the old property name (optional).
- Basic
- Array
{
"myTeamProp": {
"title": "My team",
"icon": "My icon",
"description": "My team property",
"type": "string",
"format": "team",
"default": "my-team"
}
}
{
"myTeamArray": {
"title": "My team array",
"icon": "My icon",
"description": "My team array",
"type": "array",
"items": {
"type": "string",
"format": "team"
}
}
}
Check out Port's API reference to learn more.
Terraform definition
The examples below use version 2.29.0 of the Terraform and Pulumi providers. Configure your provider first, then run one example at a time in its own project. Each example creates a blueprint; use distinct identifiers when you combine examples.
- Basic
- Array
resource "port_blueprint" "myBlueprint" {
identifier = "myBlueprint"
title = "My blueprint"
properties = {
string_props = {
myTeamProp = {
title = "My team"
required = false
format = "team"
}
}
}
}
resource "port_blueprint" "myBlueprint" {
identifier = "myBlueprint"
title = "My blueprint"
properties = {
array_props = {
myTeamArray = {
title = "My team array"
required = false
string_items = {
format = "team"
}
}
}
}
}
Pulumi definition
- Python
- TypeScript
- JavaScript
- Go
"""A Python Pulumi program"""
import pulumi
from port_pulumi import Blueprint,BlueprintPropertiesArgs,BlueprintPropertiesStringPropsArgs
blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
string_props={
"myTeamProp": BlueprintPropertiesStringPropsArgs(
title="My team",
required=False,
format="team",
)
}
),
relations={}
)
import * as pulumi from "@pulumi/pulumi";
import * as port from "@port-labs/port";
export const blueprint = new port.Blueprint("myBlueprint", {
identifier: "myBlueprint",
title: "My Blueprint",
properties: {
stringProps: {
myTeamProp: {
title: "My team",
required: false,
format: "team",
},
},
},
});
"use strict";
const pulumi = require("@pulumi/pulumi");
const port = require("@port-labs/port");
const entity = new port.Blueprint("myBlueprint", {
title: "My Blueprint",
identifier: "myBlueprint",
properties: {
stringProps: {
myTeamProp: {
title: "My team",
required: false,
format: "team",
},
},
},
relations: {},
});
exports.title = entity.title;
package main
import (
"github.com/port-labs/pulumi-port/sdk/v2/go/port"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
blueprint, err := port.NewBlueprint(ctx, "myBlueprint", &port.BlueprintArgs{
Identifier: pulumi.String("myBlueprint"),
Title: pulumi.String("My Blueprint"),
Properties: port.BlueprintPropertiesArgs{
StringProps: port.BlueprintPropertiesStringPropsMap{
"myTeamProp": &port.BlueprintPropertiesStringPropsArgs{
Title: pulumi.String("My team"),
Required: pulumi.Bool(false),
Format: pulumi.String("team"),
},
},
},
})
if err != nil {
return err
}
ctx.Export("blueprint", blueprint.Title)
return nil
})
}