()
| 249 | ) |
| 250 | |
| 251 | func buildCreateCommand() *cli.Command { |
| 252 | return &cli.Command{ |
| 253 | Name: "create", |
| 254 | Action: cliutil.ConfiguredAction(createCommand), |
| 255 | Usage: "Create a new tunnel with given name", |
| 256 | UsageText: "cloudflared tunnel [tunnel command options] create [subcommand options] NAME", |
| 257 | Description: `Creates a tunnel, registers it with Cloudflare edge and generates credential file used to run this tunnel. |
| 258 | Use "cloudflared tunnel route" subcommand to map a DNS name to this tunnel and "cloudflared tunnel run" to start the connection. |
| 259 | |
| 260 | For example, to create a tunnel named 'my-tunnel' run: |
| 261 | |
| 262 | $ cloudflared tunnel create my-tunnel`, |
| 263 | Flags: []cli.Flag{outputFormatFlag, credentialsFileFlagCLIOnly, createSecretFlag}, |
| 264 | CustomHelpTemplate: commandHelpTemplate(), |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | // generateTunnelSecret as an array of 32 bytes using secure random number generator |
| 269 | func generateTunnelSecret() ([]byte, error) { |
no test coverage detected