1. Packages
  2. Packages
  3. Formal Provider
  4. API Docs
  5. Form
Viewing docs for Formal v1.2.0
published on Saturday, Jun 6, 2026 by Formal
formal logo
Viewing docs for Formal v1.2.0
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)
    public Form(String name, FormArgs args)
    public Form(String name, FormArgs args, CustomResourceOptions options)
    
    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.FormField>
    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 []FormFieldArgs
    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<FormField>
    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 FormField[]
    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[FormFieldArgs]
    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:

    CreatedAt string
    When the form was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Last update time.
    CreatedAt string
    When the form was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Last update time.
    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.
    createdAt String
    When the form was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Last update time.
    createdAt string
    When the form was created.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt 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.
    createdAt String
    When the form was created.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    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) -> Form
    func 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.
    The following state arguments are supported:
    CreatedAt string
    When the form was created.
    Description string
    The form description.
    Fields List<Formal.Pulumi.Inputs.FormField>
    List of fields that define the form schema.
    Name string
    The name of the form. Must be unique within the organization.
    UpdatedAt string
    Last update time.
    CreatedAt string
    When the form was created.
    Description string
    The form description.
    Fields []FormFieldArgs
    List of fields that define the form schema.
    Name string
    The name of the form. Must be unique within the organization.
    UpdatedAt 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.
    createdAt String
    When the form was created.
    description String
    The form description.
    fields List<FormField>
    List of fields that define the form schema.
    name String
    The name of the form. Must be unique within the organization.
    updatedAt String
    Last update time.
    createdAt string
    When the form was created.
    description string
    The form description.
    fields FormField[]
    List of fields that define the form schema.
    name string
    The name of the form. Must be unique within the organization.
    updatedAt string
    Last update time.
    created_at str
    When the form was created.
    description str
    The form description.
    fields Sequence[FormFieldArgs]
    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.
    createdAt 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.
    updatedAt 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.FormFieldConfig
    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 FormFieldConfig
    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 object
    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 FormFieldConfig
    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 FormFieldConfig
    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 FormFieldConfig
    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 []FormFieldConfigOption
    Static options for select-like fields.
    OptionsSource FormFieldConfigOptionsSource
    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<FormFieldConfigOption>
    Static options for select-like fields.
    optionsSource FormFieldConfigOptionsSource
    Dynamic source used to fetch options.
    options FormFieldConfigOption[]
    Static options for select-like fields.
    optionsSource FormFieldConfigOptionsSource
    Dynamic source used to fetch options.
    options Sequence[FormFieldConfigOption]
    Static options for select-like fields.
    options_source FormFieldConfigOptionsSource
    Dynamic source used to fetch options.
    options List<Property Map>
    Static options for select-like fields.
    optionsSource Property Map
    Dynamic source used to fetch options.

    FormFieldConfigOption, FormFieldConfigOptionArgs

    Label string
    Option label.
    Value string
    Option value.
    Label string
    Option label.
    Value string
    Option value.
    label string
    Option label.
    value string
    Option value.
    label String
    Option label.
    value String
    Option value.
    label string
    Option label.
    value string
    Option value.
    label str
    Option label.
    value str
    Option value.
    label String
    Option label.
    value String
    Option value.

    FormFieldConfigOptionsSource, FormFieldConfigOptionsSourceArgs

    App string
    Service/app name used to fetch options.
    Command Formal.Pulumi.Inputs.FormFieldConfigOptionsSourceCommand
    Command configuration for options retrieval.
    MachineUserId string
    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.
    InputJson 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 FormFieldConfigOptionsSourceCommand
    Command configuration for options retrieval.
    MachineUserId string
    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.
    InputJson 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_id string
    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 FormFieldConfigOptionsSourceCommand
    Command configuration for options retrieval.
    machineUserId String
    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.
    inputJson 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 FormFieldConfigOptionsSourceCommand
    Command configuration for options retrieval.
    machineUserId string
    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.
    inputJson 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 FormFieldConfigOptionsSourceCommand
    Command configuration for options retrieval.
    machine_user_id str
    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.
    machineUserId String
    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.
    inputJson 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 formal Terraform Provider.
    formal logo
    Viewing docs for Formal v1.2.0
    published on Saturday, Jun 6, 2026 by Formal

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial