1. Packages
  2. Port
Port v2.0.23 published on Tuesday, Oct 1, 2024 by port-labs

Port

port logo
Port v2.0.23 published on Tuesday, Oct 1, 2024 by port-labs

    The Port Resource Provider lets you manage Port resources.

    Example

    "use strict";
    const pulumi = require("@pulumi/pulumi");
    const port = require("@port-labs/port");
    
    const entity = new port.Entity("entity", {
        identifier: "monolith",
        title: "monolith",
        blueprint: "microservice",
        properties: {
            stringProps: {
                "language": "typescript",
            }
        }
    });
    
    exports.title = entity.title;
    
    import * as port from "@port-labs/port";
    
    export const blueprint = new port.Blueprint("microservice", {
        identifier: "microservice",
        title: "Microservice",
        properties: {
            stringProps: {
                "language": {
                    default: "Go",
                }
            }
        }
    });
    
    export const entity = new port.Entity("monolith", {
        identifier: "monolith",
        title: "monolith",
        blueprint: blueprint.identifier,
        properties: {
            stringProps: {
                "language": "Node",
            }
        }
    });
    
    """A Python Pulumi program"""
    
    import pulumi
    from port_pulumi import Entity,EntityPropertiesArgs
    
    entity = Entity("port_pulumi", title="monolith", blueprint="microservice",
                    properties=EntityPropertiesArgs(string_props={"language": "python"}),
                    )
    
    package main
    
    import (
    	"github.com/port-labs/pulumi-port/sdk/go/port"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		entity, err := port.NewEntity(ctx, "entity", &port.EntityArgs{
    			Title:     pulumi.String("monolith"),
    			Blueprint: pulumi.String("microservice"),
    			Properties: port.EntityPropertiesArgs{
    				StringProps: pulumi.StringMap{
    					"language": pulumi.String("Go"),
    				},
    			},
    		})
    		ctx.Export("entity", entity.Title)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    port logo
    Port v2.0.23 published on Tuesday, Oct 1, 2024 by port-labs