Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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 @@ -59,6 +59,7 @@ stackit [flags]
* [stackit service-account](./stackit_service-account.md) - Provides functionality for service accounts
* [stackit ske](./stackit_ske.md) - Provides functionality for SKE
* [stackit sqlserverflex](./stackit_sqlserverflex.md) - Provides functionality for SQLServer Flex
* [stackit ufw](./stackit_ufw.md) - Provides functionality for UFW
* [stackit valkey](./stackit_valkey.md) - Provides functionality for Valkey
* [stackit volume](./stackit_volume.md) - Provides functionality for volumes

34 changes: 34 additions & 0 deletions docs/stackit_ufw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## stackit ufw

Provides functionality for UFW

### Synopsis

Provides functionality for STACKIT Unified Firewall (UFW).

```
stackit ufw [flags]
```

### Options

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

### 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 ufw rules](./stackit_ufw_rules.md) - Provides functionality for UFW rules

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

Provides functionality for UFW rules

### Synopsis

Provides functionality for STACKIT Unified Firewall (UFW) rules.

```
stackit ufw rules [flags]
```

### Options

```
-h, --help Help for "stackit ufw rules"
```

### 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 ufw](./stackit_ufw.md) - Provides functionality for UFW
* [stackit ufw rules create](./stackit_ufw_rules_create.md) - Creates a UFW rule instance
* [stackit ufw rules delete](./stackit_ufw_rules_delete.md) - Deletes a UFW rule instance
* [stackit ufw rules describe](./stackit_ufw_rules_describe.md) - Shows details of a UFW rule instance
* [stackit ufw rules list](./stackit_ufw_rules_list.md) - Lists all UFW rules
* [stackit ufw rules update](./stackit_ufw_rules_update.md) - Updates a UFW rule instance

47 changes: 47 additions & 0 deletions docs/stackit_ufw_rules_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## stackit ufw rules create

Creates a UFW rule instance

### Synopsis

Creates a STACKIT Unified Firewall (UFW) rule instance.

```
stackit ufw rules create [flags]
```

### Examples

```
Create a UFW rule instance of type ACL with sourceIp "1.1.1.1/32" of product "Redis" for instance with id=ID
$ stackit ufw rules create --product redis --sourceIp 1.1.1.1/32 --type ACL --instanceId ID

Create a UFW rule instance of type ACL with sourceIp "2.2.2.2/32" of product "Edge Cloud" for instance with id=ID
$ stackit ufw rules create --product edge-cloud --sourceIp 2.2.2.2/32 --type ACL --instanceId ID
```

### Options

```
-h, --help Help for "stackit ufw rules create"
-i, --instanceId string Instance ID that will have attached your rule
--product string The source service (e.g., Edge Cloud, Redis) where you want to attach a rule
-s, --sourceIp string The IP (CIDR) to which the rule applies (e.g. 192.168.0.1/32)
-t, --type string Type (ACL/SecurityRule/SecurityGroup) You can check /provider-options route for them. Unfortunately, this field could be only ACL for the CLI version
```

### 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 ufw rules](./stackit_ufw_rules.md) - Provides functionality for UFW rules

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

Deletes a UFW rule instance

### Synopsis

Deletes a STACKIT Unified Firewall (UFW) rule instance.

```
stackit ufw rules delete INSTANCE_ID [flags]
```

### Examples

```
Delete a UFW rule instance with ID "xxx"
$ stackit ufw rules delete xxx
```

### Options

```
-h, --help Help for "stackit ufw rules 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 ufw rules](./stackit_ufw_rules.md) - Provides functionality for UFW rules

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

Shows details of a UFW rule instance

### Synopsis

Shows details of a STACKIT Unified Firewall (UFW) rule instance.

```
stackit ufw rules describe INSTANCE_ID [flags]
```

### Examples

```
Get details of a UFW rule instance with ID "xxx"
$ stackit ufw rules describe xxx

Get details of a UFW rule instance with ID "xxx" in JSON format
$ stackit ufw rules describe xxx --output-format json
```

### Options

```
-h, --help Help for "stackit ufw rules 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 ufw rules](./stackit_ufw_rules.md) - Provides functionality for UFW rules

47 changes: 47 additions & 0 deletions docs/stackit_ufw_rules_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## stackit ufw rules list

Lists all UFW rules

### Synopsis

Lists all STACKIT Unified Firewall (UFW) rules.

```
stackit ufw rules list [flags]
```

### Examples

```
List all UFW rules
$ stackit ufw rules list

List all UFW rules in JSON format
$ stackit ufw rules list --output-format json

List up to 10 UFW rules
$ stackit ufw rules list --limit 10
```

### Options

```
-h, --help Help for "stackit ufw rules list"
--limit int Maximum number of entries to list
```

### 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 ufw rules](./stackit_ufw_rules.md) - Provides functionality for UFW rules

41 changes: 41 additions & 0 deletions docs/stackit_ufw_rules_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## stackit ufw rules update

Updates a UFW rule instance

### Synopsis

Updates a STACKIT Unified Firewall (UFW) rule instance.

```
stackit ufw rules update INSTANCE_ID [flags]
```

### Examples

```
Update a UFW rule instance with "1.1.1.1/32" as sourceIp for instance with ID "xxx"
$ stackit ufw rules update xxx --sourceIp 1.1.1.1/32
```

### Options

```
-h, --help Help for "stackit ufw rules update"
-s, --sourceIp string The IP (CIDR) to which the rule applies (e.g. 192.168.0.1/32)
```

### 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 ufw rules](./stackit_ufw_rules.md) - Provides functionality for UFW rules

1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ require (
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.7.1
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.1
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.18.0
github.com/stackitcloud/stackit-sdk-go/services/ufw v0.1.0
github.com/stackitcloud/stackit-sdk-go/services/valkey v0.3.1
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.15.2
github.com/zalando/go-keyring v0.2.8
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjz
github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c=
github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8=
github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
Expand Down Expand Up @@ -452,6 +454,8 @@ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE=
github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLtiy7ha80b2ZVGyacxgfww=
github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM=
github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8=
Expand Down Expand Up @@ -672,6 +676,10 @@ github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.1 h1:dSkUoaMip0uA8tnRE
github.com/stackitcloud/stackit-sdk-go/services/ske v1.21.1/go.mod h1:TbqmZhLMofmfl+HhVl6oHYcI3zvXTm1vRjN3A/fOkM4=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.18.0 h1:k4dgOFQvkBhSNTtmFOZwMbkKf6ZCEGB/D1WQgiO9gwc=
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.18.0/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
github.com/stackitcloud/stackit-sdk-go/services/ufw v0.1.0 h1:LnDUxI7v507T341Smff/fVzSSRP59uIOUmcHAbUf1hE=
github.com/stackitcloud/stackit-sdk-go/services/ufw v0.1.0/go.mod h1:c/JxzGai01jCK/5OCi0TxCUiQ1Gl7SboGuErflWxLqQ=
github.com/stackitcloud/stackit-sdk-go/services/valkey v0.2.0 h1:RP9ITvjsPhA2+Xi9MhqYP9xkEsURyxYmRB3JKXIB5zc=
github.com/stackitcloud/stackit-sdk-go/services/valkey v0.2.0/go.mod h1:etzt/a723p327dqha1V72cCoBWjUBS2DtHy3ZTac0SA=
github.com/stackitcloud/stackit-sdk-go/services/valkey v0.3.1 h1:zAdxoRrUB5sIz73xAyXXQlZZ46Yc1p3rW1PerOLHNOk=
github.com/stackitcloud/stackit-sdk-go/services/valkey v0.3.1/go.mod h1:8znHnd2b6rdEHSmW/36LQa4dMMaLuN8dwo3tD6arEic=
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.15.2 h1:82VZJaJPwcBKSj8WV8v0ujBvbkbMxFXIvvv0wU+0Be0=
Expand Down
2 changes: 2 additions & 0 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"time"

"github.com/stackitcloud/stackit-cli/internal/cmd/sqlserverflex"
"github.com/stackitcloud/stackit-cli/internal/cmd/ufw"
"github.com/stackitcloud/stackit-cli/internal/pkg/types"

affinityGroups "github.com/stackitcloud/stackit-cli/internal/cmd/affinity-groups"
Expand Down Expand Up @@ -207,6 +208,7 @@ func addSubcommands(cmd *cobra.Command, params *types.CmdParams) {
cmd.AddCommand(kms.NewCmd(params))
cmd.AddCommand(sqlserverflex.NewCmd(params))
cmd.AddCommand(valkey.NewCmd(params))
cmd.AddCommand(ufw.NewCmd(params))
}

// traverseCommands calls f for c and all of its children.
Expand Down
Loading