Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/stackit.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ stackit [flags]
### SEE ALSO

* [stackit affinity-group](./stackit_affinity-group.md) - Manage server affinity groups
* [stackit alpha](./stackit_alpha.md) - Contains alpha STACKIT CLI commands
* [stackit auth](./stackit_auth.md) - Authenticates the STACKIT CLI
* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
* [stackit config](./stackit_config.md) - Provides functionality for CLI configuration options
Expand Down
45 changes: 45 additions & 0 deletions docs/stackit_alpha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## stackit alpha

Contains alpha STACKIT CLI commands

### Synopsis

Contains alpha STACKIT CLI commands.
The commands under this group are still in an alpha state, and functionality may be incomplete or have breaking changes.

```
stackit alpha [flags]
```

### Examples

```
See the currently available alpha commands
$ stackit alpha --help

Execute an alpha command
$ stackit alpha MY_COMMAND
```

### Options

```
-h, --help Help for "stackit alpha"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit](./stackit.md) - Manage STACKIT resources using the command line
* [stackit alpha vpc](./stackit_alpha_vpc.md) - Manages vpcs

38 changes: 38 additions & 0 deletions docs/stackit_alpha_vpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## stackit alpha vpc

Manages vpcs

### Synopsis

Manages the lifecycle of vpcs.

```
stackit alpha vpc [flags]
```

### Options

```
-h, --help Help for "stackit alpha vpc"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit alpha](./stackit_alpha.md) - Contains alpha STACKIT CLI commands
* [stackit alpha vpc create](./stackit_alpha_vpc_create.md) - Creates a VPC
* [stackit alpha vpc delete](./stackit_alpha_vpc_delete.md) - Deletes a VPC
* [stackit alpha vpc describe](./stackit_alpha_vpc_describe.md) - Shows details of a VPC
* [stackit alpha vpc list](./stackit_alpha_vpc_list.md) - Lists all VPC of a project
* [stackit alpha vpc update](./stackit_alpha_vpc_update.md) - Updates a VPC

44 changes: 44 additions & 0 deletions docs/stackit_alpha_vpc_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## stackit alpha vpc create

Creates a VPC

### Synopsis

Creates a VPC.
VPC can only be used in projects with enabled VPC.

```
stackit alpha vpc create [flags]
```

### Examples

```
Create a vpc with name "my-vpc"
$ stackit alpha vpc create --name my-vpc
```

### Options

```
--description string Description of the VPC
-h, --help Help for "stackit alpha vpc create"
--labels stringToString Comma separated list of labels of the VPC (default [])
--name string Name of the VPC
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit alpha vpc](./stackit_alpha_vpc.md) - Manages vpcs

40 changes: 40 additions & 0 deletions docs/stackit_alpha_vpc_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## stackit alpha vpc delete

Deletes a VPC

### Synopsis

Deletes a VPC.

```
stackit alpha vpc delete VPC_ID [flags]
```

### Examples

```
Delete a vpc with ID "xxx"
$ stackit alpha vpc delete xxx
```

### Options

```
-h, --help Help for "stackit alpha vpc delete"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit alpha vpc](./stackit_alpha_vpc.md) - Manages vpcs

43 changes: 43 additions & 0 deletions docs/stackit_alpha_vpc_describe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## stackit alpha vpc describe

Shows details of a VPC

### Synopsis

Shows details of a VPC.

```
stackit alpha vpc describe VPC_ID [flags]
```

### Examples

```
Show details of a vpc with ID "xxx"
$ stackit alpha vpc describe xxx

Show details of a vpc with ID "xxx" in JSON format
$ stackit alpha vpc describe xxx --output-format json
```

### Options

```
-h, --help Help for "stackit alpha vpc describe"
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit alpha vpc](./stackit_alpha_vpc.md) - Manages vpcs

51 changes: 51 additions & 0 deletions docs/stackit_alpha_vpc_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## stackit alpha vpc list

Lists all VPC of a project

### Synopsis

Lists all VPC of a project.

```
stackit alpha vpc list [flags]
```

### Examples

```
Lists all VPCs
$ stackit alpha vpc list

Lists all VPCs in JSON format
$ stackit alpha vpc list --output-format json

Lists up to 10 VPCs
$ stackit alpha vpc list --limit 10

Lists all VPCs which has the name "my-vpc"
$ stackit alpha vpc list --filter "name == 'my-vpc'"
```

### Options

```
--filter string Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details
-h, --help Help for "stackit alpha vpc list"
--limit int Maximum number of VPCs to return
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit alpha vpc](./stackit_alpha_vpc.md) - Manages vpcs

46 changes: 46 additions & 0 deletions docs/stackit_alpha_vpc_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## stackit alpha vpc update

Updates a VPC

### Synopsis

Updates a VPC.

```
stackit alpha vpc update VPC_ID [flags]
```

### Examples

```
Update a vpc with ID "xxx" to new name "vpc-new"
$ stackit alpha vpc update xxx --name vpc-new

Update a vpc with ID "xxx" to new description "updated vpc"
$ stackit alpha vpc update xxx --description "updated vpc"
```

### Options

```
--description string Description of the VPC
-h, --help Help for "stackit alpha vpc update"
--labels stringToString Comma separated list of labels of the VPC (default [])
--name string Name of the VPC
```

### Options inherited from parent commands

```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, (one of: [json, pretty, none, yaml])
-p, --project-id string Project ID
--region string Target region for region-specific requests
--verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info")
```

### SEE ALSO

* [stackit alpha vpc](./stackit_alpha_vpc.md) - Manages vpcs

1 change: 1 addition & 0 deletions docs/stackit_config_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ stackit config set [flags]
--dns-custom-endpoint string DNS API base URL, used in calls to this API
--edge-custom-endpoint string Edge API base URL, used in calls to this API
-h, --help Help for "stackit config set"
--iaas-alpha-custom-endpoint string IaaS Alpha API base URL, used in calls to this API
--iaas-custom-endpoint string IaaS API base URL, used in calls to this API
--identity-provider-custom-client-id string Identity Provider client ID, used for user authentication
--identity-provider-custom-well-known-configuration string Identity Provider well-known OpenID configuration URL, used for user authentication
Expand Down
1 change: 1 addition & 0 deletions docs/stackit_config_unset.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ stackit config unset [flags]
--dns-custom-endpoint DNS API base URL. If unset, uses the default base URL
--edge-custom-endpoint Edge API base URL. If unset, uses the default base URL
-h, --help Help for "stackit config unset"
--iaas-alpha-custom-endpoint IaaS Alpha API base URL. If unset, uses the default base URL
--iaas-custom-endpoint IaaS API base URL. If unset, uses the default base URL
--identity-provider-custom-client-id Identity Provider client ID, used for user authentication
--identity-provider-custom-well-known-configuration Identity Provider well-known OpenID configuration URL. If unset, uses the default identity provider
Expand Down
39 changes: 39 additions & 0 deletions internal/cmd/alpha/alpha.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package alpha

import (
"fmt"

"github.com/spf13/cobra"

"github.com/stackitcloud/stackit-cli/internal/cmd/alpha/vpc"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/examples"
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
)

func NewCmd(params *types.CmdParams) *cobra.Command {
cmd := &cobra.Command{
Use: "alpha",
Short: "Contains alpha STACKIT CLI commands",
Long: fmt.Sprintf("%s\n%s",
"Contains alpha STACKIT CLI commands.",
"The commands under this group are still in an alpha state, and functionality may be incomplete or have breaking changes."),
Args: args.NoArgs,
Run: utils.CmdHelp,
Example: examples.Build(
examples.NewExample(
"See the currently available alpha commands",
"$ stackit alpha --help"),
examples.NewExample(
"Execute an alpha command",
"$ stackit alpha MY_COMMAND"),
),
}
addSubcommands(cmd, params)
return cmd
}

func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
cmd.AddCommand(vpc.NewCmd(params))
}
Loading
Loading