published on Monday, Sep 21, 2026 by Formal
published on Monday, Sep 21, 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,
native_users_v3_enabled: Optional[bool] = 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.
resource "formal_resource" "name" {
# resource properties
}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",
NativeUsersV3Enabled = false,
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"),
NativeUsersV3Enabled: pulumi.Bool(false),
SpaceId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TechnologyProvider: pulumi.String("string"),
TerminationProtection: pulumi.Bool(false),
})
resource "formal_resource" "resourceResource" {
lifecycle {
create_before_destroy = true
}
hostname = "string"
port = 0
technology = "string"
aliases = ["string"]
name = "string"
native_users_v3_enabled = false
space_id = "string"
tags = {
"string" = "string"
}
technology_provider = "string"
termination_protection = false
}
var resourceResource = new Resource("resourceResource", ResourceArgs.builder()
.hostname("string")
.port(0)
.technology("string")
.aliases("string")
.name("string")
.nativeUsersV3Enabled(false)
.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",
native_users_v3_enabled=False,
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",
nativeUsersV3Enabled: false,
spaceId: "string",
tags: {
string: "string",
},
technologyProvider: "string",
terminationProtection: false,
});
type: formal:Resource
properties:
aliases:
- string
hostname: string
name: string
nativeUsersV3Enabled: false
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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- Name string
- Friendly name for the Resource.
- Native
Users boolV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- Space
Id string - The ID of the Space to create the Resource in.
- Dictionary<string, string>
- Tags to apply to the Resource.
- Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - Termination
Protection 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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- Name string
- Friendly name for the Resource.
- Native
Users boolV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- Space
Id string - The ID of the Space to create the Resource in.
- map[string]string
- Tags to apply to the Resource.
- Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- name string
- Friendly name for the Resource.
- native_
users_ boolv3_ enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- space_
id string - The ID of the Space to create the Resource in.
- map(string)
- Tags to apply to the Resource.
- technology_
provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination_
protection 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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- name String
- Friendly name for the Resource.
- native
Users BooleanV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- space
Id String - The ID of the Space to create the Resource in.
- Map<String,String>
- Tags to apply to the Resource.
- technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination
Protection 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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- name string
- Friendly name for the Resource.
- native
Users booleanV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- space
Id string - The ID of the Space to create the Resource in.
- {[key: string]: string}
- Tags to apply to the Resource.
- technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination
Protection 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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- name str
- Friendly name for the Resource.
- native_
users_ boolv3_ enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- space_
id str - The ID of the Space to create the Resource in.
- 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, andaws-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
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - 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.
- name String
- Friendly name for the Resource.
- native
Users BooleanV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- space
Id String - The ID of the Space to create the Resource in.
- Map<String>
- Tags to apply to the Resource.
- technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination
Protection 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:
- Created
At int - Creation time of the Resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Native
User stringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- Created
At int - Creation time of the Resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Native
User stringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- created_
at number - Creation time of the Resource.
- id string
- The provider-assigned unique ID for this managed resource.
- native_
user_ stringselection_ cel - The CEL expression that selects which Native User V3 a session connects as.
- created
At Integer - Creation time of the Resource.
- id String
- The provider-assigned unique ID for this managed resource.
- native
User StringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- created
At number - Creation time of the Resource.
- id string
- The provider-assigned unique ID for this managed resource.
- native
User stringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- created_
at int - Creation time of the Resource.
- id str
- The provider-assigned unique ID for this managed resource.
- native_
user_ strselection_ cel - The CEL expression that selects which Native User V3 a session connects as.
- created
At Number - Creation time of the Resource.
- id String
- The provider-assigned unique ID for this managed resource.
- native
User StringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
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,
native_user_selection_cel: Optional[str] = None,
native_users_v3_enabled: Optional[bool] = 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) -> Resourcefunc 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}import {
to = formal_resource.example
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.
- Aliases List<string>
- Aliases to apply to the Resource.
- Created
At int - Creation time of the Resource.
- Environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- Hostname string
- Hostname of the Resource.
- Name string
- Friendly name for the Resource.
- Native
User stringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- Native
Users boolV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- Port int
- The port your Resource is listening on.
- Space
Id string - The ID of the Space to create the Resource in.
- Dictionary<string, string>
- Tags to apply to the Resource.
- Technology string
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - Termination
Protection bool - If set to true, the Resource cannot be deleted.
- Aliases []string
- Aliases to apply to the Resource.
- Created
At int - Creation time of the Resource.
- Environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- Hostname string
- Hostname of the Resource.
- Name string
- Friendly name for the Resource.
- Native
User stringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- Native
Users boolV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- Port int
- The port your Resource is listening on.
- Space
Id string - The ID of the Space to create the Resource in.
- map[string]string
- Tags to apply to the Resource.
- Technology string
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - Termination
Protection bool - If set to true, the Resource cannot be deleted.
- aliases list(string)
- Aliases to apply to the Resource.
- created_
at number - Creation time of the Resource.
- environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname string
- Hostname of the Resource.
- name string
- Friendly name for the Resource.
- native_
user_ stringselection_ cel - The CEL expression that selects which Native User V3 a session connects as.
- native_
users_ boolv3_ enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- port number
- The port your Resource is listening on.
- space_
id string - The ID of the Space to create the Resource in.
- map(string)
- Tags to apply to the Resource.
- technology string
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - technology_
provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination_
protection bool - If set to true, the Resource cannot be deleted.
- aliases List<String>
- Aliases to apply to the Resource.
- created
At Integer - Creation time of the Resource.
- environment String
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname String
- Hostname of the Resource.
- name String
- Friendly name for the Resource.
- native
User StringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- native
Users BooleanV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- port Integer
- The port your Resource is listening on.
- space
Id String - The ID of the Space to create the Resource in.
- Map<String,String>
- Tags to apply to the Resource.
- technology String
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination
Protection Boolean - If set to true, the Resource cannot be deleted.
- aliases string[]
- Aliases to apply to the Resource.
- created
At number - Creation time of the Resource.
- environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname string
- Hostname of the Resource.
- name string
- Friendly name for the Resource.
- native
User stringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- native
Users booleanV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- port number
- The port your Resource is listening on.
- space
Id string - The ID of the Space to create the Resource in.
- {[key: string]: string}
- Tags to apply to the Resource.
- technology string
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination
Protection 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.
- hostname str
- Hostname of the Resource.
- name str
- Friendly name for the Resource.
- native_
user_ strselection_ cel - The CEL expression that selects which Native User V3 a session connects as.
- native_
users_ boolv3_ enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- port int
- The port your Resource is listening on.
- space_
id str - The ID of the Space to create the Resource in.
- Mapping[str, str]
- Tags to apply to the Resource.
- technology str
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - technology_
provider str - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination_
protection bool - If set to true, the Resource cannot be deleted.
- aliases List<String>
- Aliases to apply to the Resource.
- created
At Number - Creation time of the Resource.
- environment String
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname String
- Hostname of the Resource.
- name String
- Friendly name for the Resource.
- native
User StringSelection Cel - The CEL expression that selects which Native User V3 a session connects as.
- native
Users BooleanV3Enabled - Whether the Resource uses Native Users V3. When omitted, new Resources enable V3 while existing Resources preserve their current mode. Only one Native User version can be enabled at a time.
- port Number
- The port your Resource is listening on.
- space
Id String - The ID of the Space to create the Resource in.
- Map<String>
- Tags to apply to the Resource.
- technology String
- Technology of the Resource: supported values are
aws,bigquery,clickhouse,dynamodb,gcp,grpc,http,kubernetes,llm,mariadb,mcp,mongodb,mysql,postgres,rdp,redis,redshift,s3,snowflake,socket,ssh,web. - technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2, andaws-ecs - termination
Protection 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
formalTerraform Provider.
published on Monday, Sep 21, 2026 by Formal