published on Saturday, Jun 6, 2026 by Formal
published on Saturday, Jun 6, 2026 by Formal
Forms define reusable input schemas for workflows.
Create Form Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Form(name: string, args: FormArgs, opts?: CustomResourceOptions);@overload
def Form(resource_name: str,
args: FormArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Form(resource_name: str,
opts: Optional[ResourceOptions] = None,
fields: Optional[Sequence[FormFieldArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None)func NewForm(ctx *Context, name string, args FormArgs, opts ...ResourceOption) (*Form, error)public Form(string name, FormArgs args, CustomResourceOptions? opts = null)type: formal:Form
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "formal_form" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FormArgs
- 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 FormArgs
- 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 FormArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FormArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FormArgs
- 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 formResource = new Pulumi.Form("formResource", new()
{
Fields = new[]
{
new Pulumi.Inputs.FormFieldArgs
{
Id = "string",
Name = "string",
Type = "string",
Config = new Pulumi.Inputs.FormFieldConfigArgs
{
Options = new[]
{
new Pulumi.Inputs.FormFieldConfigOptionArgs
{
Label = "string",
Value = "string",
},
},
OptionsSource = new Pulumi.Inputs.FormFieldConfigOptionsSourceArgs
{
App = "string",
Command = new Pulumi.Inputs.FormFieldConfigOptionsSourceCommandArgs
{
Name = "string",
},
MachineUserId = "string",
Transform = "string",
Input =
{
{ "string", "string" },
},
InputJson = "string",
},
},
},
},
Description = "string",
Name = "string",
});
example, err := formal.NewForm(ctx, "formResource", &formal.FormArgs{
Fields: formal.FormFieldArray{
&formal.FormFieldArgs{
Id: pulumi.String("string"),
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Config: &formal.FormFieldConfigArgs{
Options: formal.FormFieldConfigOptionArray{
&formal.FormFieldConfigOptionArgs{
Label: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
OptionsSource: &formal.FormFieldConfigOptionsSourceArgs{
App: pulumi.String("string"),
Command: &formal.FormFieldConfigOptionsSourceCommandArgs{
Name: pulumi.String("string"),
},
MachineUserId: pulumi.String("string"),
Transform: pulumi.String("string"),
Input: pulumi.StringMap{
"string": pulumi.String("string"),
},
InputJson: pulumi.String("string"),
},
},
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "formal_form" "formResource" {
fields {
id = "string"
name = "string"
type = "string"
config = {
options = [{
"label" = "string"
"value" = "string"
}]
options_source = {
app = "string"
command = {
name = "string"
}
machine_user_id = "string"
transform = "string"
input = {
"string" = "string"
}
input_json = "string"
}
}
}
description = "string"
name = "string"
}
var formResource = new Form("formResource", FormArgs.builder()
.fields(FormFieldArgs.builder()
.id("string")
.name("string")
.type("string")
.config(FormFieldConfigArgs.builder()
.options(FormFieldConfigOptionArgs.builder()
.label("string")
.value("string")
.build())
.optionsSource(FormFieldConfigOptionsSourceArgs.builder()
.app("string")
.command(FormFieldConfigOptionsSourceCommandArgs.builder()
.name("string")
.build())
.machineUserId("string")
.transform("string")
.input(Map.of("string", "string"))
.inputJson("string")
.build())
.build())
.build())
.description("string")
.name("string")
.build());
form_resource = formal.Form("formResource",
fields=[{
"id": "string",
"name": "string",
"type": "string",
"config": {
"options": [{
"label": "string",
"value": "string",
}],
"options_source": {
"app": "string",
"command": {
"name": "string",
},
"machine_user_id": "string",
"transform": "string",
"input": {
"string": "string",
},
"input_json": "string",
},
},
}],
description="string",
name="string")
const formResource = new formal.Form("formResource", {
fields: [{
id: "string",
name: "string",
type: "string",
config: {
options: [{
label: "string",
value: "string",
}],
optionsSource: {
app: "string",
command: {
name: "string",
},
machineUserId: "string",
transform: "string",
input: {
string: "string",
},
inputJson: "string",
},
},
}],
description: "string",
name: "string",
});
type: formal:Form
properties:
description: string
fields:
- config:
options:
- label: string
value: string
optionsSource:
app: string
command:
name: string
input:
string: string
inputJson: string
machineUserId: string
transform: string
id: string
name: string
type: string
name: string
Form 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 Form resource accepts the following input properties:
- Fields
List<Formal.
Pulumi. Inputs. Form Field> - List of fields that define the form schema.
- Description string
- The form description.
- Name string
- The name of the form. Must be unique within the organization.
- Fields
[]Form
Field Args - List of fields that define the form schema.
- Description string
- The form description.
- Name string
- The name of the form. Must be unique within the organization.
- fields list(object)
- List of fields that define the form schema.
- description string
- The form description.
- name string
- The name of the form. Must be unique within the organization.
- fields
List<Form
Field> - List of fields that define the form schema.
- description String
- The form description.
- name String
- The name of the form. Must be unique within the organization.
- fields
Form
Field[] - List of fields that define the form schema.
- description string
- The form description.
- name string
- The name of the form. Must be unique within the organization.
- fields
Sequence[Form
Field Args] - List of fields that define the form schema.
- description str
- The form description.
- name str
- The name of the form. Must be unique within the organization.
- fields List<Property Map>
- List of fields that define the form schema.
- description String
- The form description.
- name String
- The name of the form. Must be unique within the organization.
Outputs
All input properties are implicitly available as output properties. Additionally, the Form resource produces the following output properties:
- created_
at string - When the form was created.
- id string
- The provider-assigned unique ID for this managed resource.
- updated_
at string - Last update time.
- created_
at str - When the form was created.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - Last update time.
Look up Existing Form Resource
Get an existing Form 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?: FormState, opts?: CustomResourceOptions): Form@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
fields: Optional[Sequence[FormFieldArgs]] = None,
name: Optional[str] = None,
updated_at: Optional[str] = None) -> Formfunc GetForm(ctx *Context, name string, id IDInput, state *FormState, opts ...ResourceOption) (*Form, error)public static Form Get(string name, Input<string> id, FormState? state, CustomResourceOptions? opts = null)public static Form get(String name, Output<String> id, FormState state, CustomResourceOptions options)resources: _: type: formal:Form get: id: ${id}import {
to = formal_form.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.
- Created
At string - When the form was created.
- Description string
- The form description.
- Fields
List<Formal.
Pulumi. Inputs. Form Field> - List of fields that define the form schema.
- Name string
- The name of the form. Must be unique within the organization.
- Updated
At string - Last update time.
- Created
At string - When the form was created.
- Description string
- The form description.
- Fields
[]Form
Field Args - List of fields that define the form schema.
- Name string
- The name of the form. Must be unique within the organization.
- Updated
At string - Last update time.
- created_
at string - When the form was created.
- description string
- The form description.
- fields list(object)
- List of fields that define the form schema.
- name string
- The name of the form. Must be unique within the organization.
- updated_
at string - Last update time.
- created
At String - When the form was created.
- description String
- The form description.
- fields
List<Form
Field> - List of fields that define the form schema.
- name String
- The name of the form. Must be unique within the organization.
- updated
At String - Last update time.
- created
At string - When the form was created.
- description string
- The form description.
- fields
Form
Field[] - List of fields that define the form schema.
- name string
- The name of the form. Must be unique within the organization.
- updated
At string - Last update time.
- created_
at str - When the form was created.
- description str
- The form description.
- fields
Sequence[Form
Field Args] - List of fields that define the form schema.
- name str
- The name of the form. Must be unique within the organization.
- updated_
at str - Last update time.
- created
At String - When the form was created.
- description String
- The form description.
- fields List<Property Map>
- List of fields that define the form schema.
- name String
- The name of the form. Must be unique within the organization.
- updated
At String - Last update time.
Supporting Types
FormField, FormFieldArgs
- Id string
- Unique field identifier.
- Name string
- Display name of the field.
- Type string
- Field type.
- Config
Formal.
Pulumi. Inputs. Form Field Config - Optional field configuration for select-like field types.
- Id string
- Unique field identifier.
- Name string
- Display name of the field.
- Type string
- Field type.
- Config
Form
Field Config - Optional field configuration for select-like field types.
- id String
- Unique field identifier.
- name String
- Display name of the field.
- type String
- Field type.
- config
Form
Field Config - Optional field configuration for select-like field types.
- id string
- Unique field identifier.
- name string
- Display name of the field.
- type string
- Field type.
- config
Form
Field Config - Optional field configuration for select-like field types.
- id str
- Unique field identifier.
- name str
- Display name of the field.
- type str
- Field type.
- config
Form
Field Config - Optional field configuration for select-like field types.
- id String
- Unique field identifier.
- name String
- Display name of the field.
- type String
- Field type.
- config Property Map
- Optional field configuration for select-like field types.
FormFieldConfig, FormFieldConfigArgs
- Options
List<Formal.
Pulumi. Inputs. Form Field Config Option> - Static options for select-like fields.
- Options
Source Formal.Pulumi. Inputs. Form Field Config Options Source - Dynamic source used to fetch options.
- Options
[]Form
Field Config Option - Static options for select-like fields.
- Options
Source FormField Config Options Source - Dynamic source used to fetch options.
- options list(object)
- Static options for select-like fields.
- options_
source object - Dynamic source used to fetch options.
- options
List<Form
Field Config Option> - Static options for select-like fields.
- options
Source FormField Config Options Source - Dynamic source used to fetch options.
- options
Form
Field Config Option[] - Static options for select-like fields.
- options
Source FormField Config Options Source - Dynamic source used to fetch options.
- options
Sequence[Form
Field Config Option] - Static options for select-like fields.
- options_
source FormField Config Options Source - Dynamic source used to fetch options.
- options List<Property Map>
- Static options for select-like fields.
- options
Source Property Map - Dynamic source used to fetch options.
FormFieldConfigOption, FormFieldConfigOptionArgs
FormFieldConfigOptionsSource, FormFieldConfigOptionsSourceArgs
- App string
- Service/app name used to fetch options.
- Command
Formal.
Pulumi. Inputs. Form Field Config Options Source Command - Command configuration for options retrieval.
- Machine
User stringId - Machine user used to authenticate options retrieval.
- Transform string
- CEL expression that transforms the response into options.
- Input Dictionary<string, string>
- Optional payload for options retrieval.
- Input
Json string - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
- App string
- Service/app name used to fetch options.
- Command
Form
Field Config Options Source Command - Command configuration for options retrieval.
- Machine
User stringId - Machine user used to authenticate options retrieval.
- Transform string
- CEL expression that transforms the response into options.
- Input map[string]string
- Optional payload for options retrieval.
- Input
Json string - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
- app string
- Service/app name used to fetch options.
- command object
- Command configuration for options retrieval.
- machine_
user_ stringid - Machine user used to authenticate options retrieval.
- transform string
- CEL expression that transforms the response into options.
- input map(string)
- Optional payload for options retrieval.
- input_
json string - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
- app String
- Service/app name used to fetch options.
- command
Form
Field Config Options Source Command - Command configuration for options retrieval.
- machine
User StringId - Machine user used to authenticate options retrieval.
- transform String
- CEL expression that transforms the response into options.
- input Map<String,String>
- Optional payload for options retrieval.
- input
Json String - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
- app string
- Service/app name used to fetch options.
- command
Form
Field Config Options Source Command - Command configuration for options retrieval.
- machine
User stringId - Machine user used to authenticate options retrieval.
- transform string
- CEL expression that transforms the response into options.
- input {[key: string]: string}
- Optional payload for options retrieval.
- input
Json string - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
- app str
- Service/app name used to fetch options.
- command
Form
Field Config Options Source Command - Command configuration for options retrieval.
- machine_
user_ strid - Machine user used to authenticate options retrieval.
- transform str
- CEL expression that transforms the response into options.
- input Mapping[str, str]
- Optional payload for options retrieval.
- input_
json str - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
- app String
- Service/app name used to fetch options.
- command Property Map
- Command configuration for options retrieval.
- machine
User StringId - Machine user used to authenticate options retrieval.
- transform String
- CEL expression that transforms the response into options.
- input Map<String>
- Optional payload for options retrieval.
- input
Json String - Optional payload for options retrieval as a JSON object string. Use this when the payload contains non-string JSON values such as numbers, booleans, arrays, or nested objects. Mutually exclusive with input.
FormFieldConfigOptionsSourceCommand, FormFieldConfigOptionsSourceCommandArgs
- Name string
- Command name.
- Name string
- Command name.
- name string
- Command name.
- name String
- Command name.
- name string
- Command name.
- name str
- Command name.
- name String
- Command name.
Package Details
- Repository
- formal formalco/pulumi-formal
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
formalTerraform Provider.
published on Saturday, Jun 6, 2026 by Formal