1. Packages
  2. Formal Provider
  3. API Docs
  4. Resource
Formal v1.1.0 published on Sunday, Mar 1, 2026 by Formal
formal logo
Formal v1.1.0 published on Sunday, Mar 1, 2026 by Formal

    Registering a Resource with Formal.

    Create Resource Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);
    @overload
    def Resource(resource_name: str,
                 args: ResourceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Resource(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 hostname: Optional[str] = None,
                 port: Optional[int] = None,
                 technology: Optional[str] = None,
                 aliases: Optional[Sequence[str]] = None,
                 environment: Optional[str] = None,
                 name: Optional[str] = None,
                 space_id: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 technology_provider: Optional[str] = None,
                 termination_protection: Optional[bool] = None)
    func NewResource(ctx *Context, name string, args ResourceArgs, opts ...ResourceOption) (*Resource, error)
    public Resource(string name, ResourceArgs args, CustomResourceOptions? opts = null)
    public Resource(String name, ResourceArgs args)
    public Resource(String name, ResourceArgs args, CustomResourceOptions options)
    
    type: formal:Resource
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ResourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ResourceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ResourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var resourceResource = new Pulumi.Resource("resourceResource", new()
    {
        Hostname = "string",
        Port = 0,
        Technology = "string",
        Aliases = new[]
        {
            "string",
        },
        Name = "string",
        SpaceId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TechnologyProvider = "string",
        TerminationProtection = false,
    });
    
    example, err := formal.NewResource(ctx, "resourceResource", &formal.ResourceArgs{
    	Hostname:   pulumi.String("string"),
    	Port:       pulumi.Int(0),
    	Technology: pulumi.String("string"),
    	Aliases: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	SpaceId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TechnologyProvider:    pulumi.String("string"),
    	TerminationProtection: pulumi.Bool(false),
    })
    
    var resourceResource = new Resource("resourceResource", ResourceArgs.builder()
        .hostname("string")
        .port(0)
        .technology("string")
        .aliases("string")
        .name("string")
        .spaceId("string")
        .tags(Map.of("string", "string"))
        .technologyProvider("string")
        .terminationProtection(false)
        .build());
    
    resource_resource = formal.Resource("resourceResource",
        hostname="string",
        port=0,
        technology="string",
        aliases=["string"],
        name="string",
        space_id="string",
        tags={
            "string": "string",
        },
        technology_provider="string",
        termination_protection=False)
    
    const resourceResource = new formal.Resource("resourceResource", {
        hostname: "string",
        port: 0,
        technology: "string",
        aliases: ["string"],
        name: "string",
        spaceId: "string",
        tags: {
            string: "string",
        },
        technologyProvider: "string",
        terminationProtection: false,
    });
    
    type: formal:Resource
    properties:
        aliases:
            - string
        hostname: string
        name: string
        port: 0
        spaceId: string
        tags:
            string: string
        technology: string
        technologyProvider: string
        terminationProtection: false
    

    Resource Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Resource resource accepts the following input properties:

    Hostname string
    Hostname of the Resource.
    Port int
    The port your Resource is listening on.
    Technology string
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    Aliases List<string>
    Aliases to apply to the Resource.
    Environment string
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    Name string
    Friendly name for the Resource.
    SpaceId string
    The ID of the Space to create the Resource in.
    Tags Dictionary<string, string>
    Tags to apply to the Resource.
    TechnologyProvider string
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    TerminationProtection bool
    If set to true, the Resource cannot be deleted.
    Hostname string
    Hostname of the Resource.
    Port int
    The port your Resource is listening on.
    Technology string
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    Aliases []string
    Aliases to apply to the Resource.
    Environment string
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    Name string
    Friendly name for the Resource.
    SpaceId string
    The ID of the Space to create the Resource in.
    Tags map[string]string
    Tags to apply to the Resource.
    TechnologyProvider string
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    TerminationProtection bool
    If set to true, the Resource cannot be deleted.
    hostname String
    Hostname of the Resource.
    port Integer
    The port your Resource is listening on.
    technology String
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    aliases List<String>
    Aliases to apply to the Resource.
    environment String
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    name String
    Friendly name for the Resource.
    spaceId String
    The ID of the Space to create the Resource in.
    tags Map<String,String>
    Tags to apply to the Resource.
    technologyProvider String
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    terminationProtection Boolean
    If set to true, the Resource cannot be deleted.
    hostname string
    Hostname of the Resource.
    port number
    The port your Resource is listening on.
    technology string
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    aliases string[]
    Aliases to apply to the Resource.
    environment string
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    name string
    Friendly name for the Resource.
    spaceId string
    The ID of the Space to create the Resource in.
    tags {[key: string]: string}
    Tags to apply to the Resource.
    technologyProvider string
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    terminationProtection boolean
    If set to true, the Resource cannot be deleted.
    hostname str
    Hostname of the Resource.
    port int
    The port your Resource is listening on.
    technology str
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    aliases Sequence[str]
    Aliases to apply to the Resource.
    environment str
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    name str
    Friendly name for the Resource.
    space_id str
    The ID of the Space to create the Resource in.
    tags Mapping[str, str]
    Tags to apply to the Resource.
    technology_provider str
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    termination_protection bool
    If set to true, the Resource cannot be deleted.
    hostname String
    Hostname of the Resource.
    port Number
    The port your Resource is listening on.
    technology String
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    aliases List<String>
    Aliases to apply to the Resource.
    environment String
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    name String
    Friendly name for the Resource.
    spaceId String
    The ID of the Space to create the Resource in.
    tags Map<String>
    Tags to apply to the Resource.
    technologyProvider String
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    terminationProtection Boolean
    If set to true, the Resource cannot be deleted.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Resource resource produces the following output properties:

    CreatedAt int
    Creation time of the Resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt int
    Creation time of the Resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdAt Integer
    Creation time of the Resource.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt number
    Creation time of the Resource.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at int
    Creation time of the Resource.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt Number
    Creation time of the Resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Resource Resource

    Get an existing Resource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ResourceState, opts?: CustomResourceOptions): Resource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aliases: Optional[Sequence[str]] = None,
            created_at: Optional[int] = None,
            environment: Optional[str] = None,
            hostname: Optional[str] = None,
            name: Optional[str] = None,
            port: Optional[int] = None,
            space_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            technology: Optional[str] = None,
            technology_provider: Optional[str] = None,
            termination_protection: Optional[bool] = None) -> Resource
    func GetResource(ctx *Context, name string, id IDInput, state *ResourceState, opts ...ResourceOption) (*Resource, error)
    public static Resource Get(string name, Input<string> id, ResourceState? state, CustomResourceOptions? opts = null)
    public static Resource get(String name, Output<String> id, ResourceState state, CustomResourceOptions options)
    resources:  _:    type: formal:Resource    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Aliases List<string>
    Aliases to apply to the Resource.
    CreatedAt int
    Creation time of the Resource.
    Environment string
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    Hostname string
    Hostname of the Resource.
    Name string
    Friendly name for the Resource.
    Port int
    The port your Resource is listening on.
    SpaceId string
    The ID of the Space to create the Resource in.
    Tags Dictionary<string, string>
    Tags to apply to the Resource.
    Technology string
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    TechnologyProvider string
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    TerminationProtection bool
    If set to true, the Resource cannot be deleted.
    Aliases []string
    Aliases to apply to the Resource.
    CreatedAt int
    Creation time of the Resource.
    Environment string
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    Hostname string
    Hostname of the Resource.
    Name string
    Friendly name for the Resource.
    Port int
    The port your Resource is listening on.
    SpaceId string
    The ID of the Space to create the Resource in.
    Tags map[string]string
    Tags to apply to the Resource.
    Technology string
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    TechnologyProvider string
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    TerminationProtection bool
    If set to true, the Resource cannot be deleted.
    aliases List<String>
    Aliases to apply to the Resource.
    createdAt Integer
    Creation time of the Resource.
    environment String
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    hostname String
    Hostname of the Resource.
    name String
    Friendly name for the Resource.
    port Integer
    The port your Resource is listening on.
    spaceId String
    The ID of the Space to create the Resource in.
    tags Map<String,String>
    Tags to apply to the Resource.
    technology String
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    technologyProvider String
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    terminationProtection Boolean
    If set to true, the Resource cannot be deleted.
    aliases string[]
    Aliases to apply to the Resource.
    createdAt number
    Creation time of the Resource.
    environment string
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    hostname string
    Hostname of the Resource.
    name string
    Friendly name for the Resource.
    port number
    The port your Resource is listening on.
    spaceId string
    The ID of the Space to create the Resource in.
    tags {[key: string]: string}
    Tags to apply to the Resource.
    technology string
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    technologyProvider string
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    terminationProtection boolean
    If set to true, the Resource cannot be deleted.
    aliases Sequence[str]
    Aliases to apply to the Resource.
    created_at int
    Creation time of the Resource.
    environment str
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    hostname str
    Hostname of the Resource.
    name str
    Friendly name for the Resource.
    port int
    The port your Resource is listening on.
    space_id str
    The ID of the Space to create the Resource in.
    tags Mapping[str, str]
    Tags to apply to the Resource.
    technology str
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    technology_provider str
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    termination_protection bool
    If set to true, the Resource cannot be deleted.
    aliases List<String>
    Aliases to apply to the Resource.
    createdAt Number
    Creation time of the Resource.
    environment String
    Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.

    Deprecated: This field is deprecated and will be removed in a future release.

    hostname String
    Hostname of the Resource.
    name String
    Friendly name for the Resource.
    port Number
    The port your Resource is listening on.
    spaceId String
    The ID of the Space to create the Resource in.
    tags Map<String>
    Tags to apply to the Resource.
    technology String
    Technology of the Resource: supported values are snowflake, postgres, rdp, redshift, mysql, mariadb, s3, dynamodb, mongodb, documentdb, http, clickhouse, redis, web, ssh and grpc.
    technologyProvider String
    For SSH resources, if the backend connection is SSM, supported values are aws-ec2, and aws-ecs
    terminationProtection Boolean
    If set to true, the Resource cannot be deleted.

    Package Details

    Repository
    formal formalco/pulumi-formal
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the formal Terraform Provider.
    formal logo
    Formal v1.1.0 published on Sunday, Mar 1, 2026 by Formal
      Meet Neo: Your AI Platform Teammate