--- layout: docs page_title: targets create - Command description: |- The "targets create" command lets you create a new target. --- # targets create Command: `targets create` The `targets create` command lets you create a new target. ## Example This example creates a TCP target with the name `prodops` and the description `For ProdOps usage`: ```shell-session $ boundary targets create tcp -name prodops -description "For ProdOps usage" ``` ## Usage ```shell-session $ boundary targets create [type] [sub command] [options] [args] Please see the typed subcommand help for detailed usage information. Subcommands: ssh Create a ssh-type target (HCP only) tcp Create a tcp-type target ``` ### Usages by type You can create SSH or TCP targets. The `targets create ssh` command lets you create SSH targets. #### Example This example creates an SSH target with the name `prodops` and the description `SSH target for ProdOps`: ```shell-session $ boundary targets create ssh -name prodops -description "SSH target for ProdOps" ``` #### Usage ```shell-session $ boundary targets create ssh [options] [args] ``` #### SSH target options - `-address=` - An optional valid network address for the target to connect to. You cannot use an address alongside host sources. - `-default-client-port=` - The default client port on the target. - `-default-port=` - The default port on the target. If you do not specify a default port, Boundary uses port 22. - `-egress-worker-filter=` - A Boolean expression that filters which egress workers can process sessions for the target. - `-enable-session-recording=` - A Boolean expression you can use to enable session recording for the target. - `-ingress-worker-filter=` - A Boolean expression that filters which ingress workers can process sessions for the target. - `-session-connection-limit=` - The maximum number of connections allowed for a session. A value of `-1` means the connections are unlimited. - `-session-max-seconds=` - The maximum lifetime of the session, including all connections. You can specify an integer number of seconds or a duration string. - `-storage-bucket-id=` - The public ID of the storage bucket to associate with the target. - `-with-alias-authorize-session-host-id=` - The host ID that an alias uses to authorize sessions for the target. - `-with-alias-scope-id=` - The scope ID that you want to create the target and alias in. The default is `global`. At this time, aliases are only supported for the global scope. - `-with-alias-value=` - The value of the alias that you want to use to represent the target. Use this parameter to create the alias and target, and associate them with each other, at the same time. The `targets create tcp` command lets you create TCP targets. #### Example This example creates a TCP target with the name `prodops` and the description `TCP target for ProdOps`: ```shell-session $ boundary targets create tcp -name prodops -description "TCP target for ProdOps" ``` #### Usage ```shell-session $ boundary targets create tcp [options] [args] ``` #### TCP target options - `-address=` - An optional valid network address for the target to connect to. You cannot use an address alongside host sources. - `-default-client-port=` - The default client port on the target. - `-default-port=` - The default port on the target. If you do not specify a default port, Boundary uses port 22. - `-egress-worker-filter=` - A Boolean expression that filters which egress workers can process sessions for the target. - `-ingress-worker-filter=` - A Boolean expression that filters which ingress workers can process sessions for the target. - `-session-connection-limit=` - The maximum number of connections allowed for a session. A value of `-1` means the connections are unlimited. - `-session-max-seconds=` - The maximum lifetime of the session, including all connections. You can specify an integer number of seconds or a duration string. - `-with-alias-authorize-session-host-id=` - The host ID that an alias uses to authorize sessions for the target. - `-with-alias-scope-id=` - The scope ID that you want to create the alias in at target creation time. The default is `global`. At this time, aliases are only supported for the global scope. - `-with-alias-value=` - The value of the alias that you want to use to represent the target. Use this parameter to create the alias and target, and associate them with each other, at the same time. @include 'cmd-option-note.mdx'