Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard IaaS security group rule commands #523

Merged
merged 21 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
09846ac
onboard security group rule commands
GokceGK Dec 5, 2024
2e64f20
fix NPE
GokceGK Dec 5, 2024
ac8fba6
Update internal/cmd/beta/security-group-rule/create/create.go
GokceGK Dec 10, 2024
963d740
Update internal/cmd/beta/security-group-rule/create/create.go
GokceGK Dec 10, 2024
a9e1dd8
Update internal/cmd/beta/security-group-rule/list/list.go
GokceGK Dec 10, 2024
1104f08
Update internal/cmd/beta/security-group-rule/create/create_test.go
GokceGK Dec 10, 2024
5ff0eff
fix unit tests
GokceGK Dec 10, 2024
281a844
Update internal/cmd/beta/security-group-rule/delete/delete_test.go
GokceGK Dec 10, 2024
93efa2b
Update internal/cmd/beta/security-group-rule/delete/delete_test.go
GokceGK Dec 10, 2024
0ba7563
Update internal/cmd/beta/security-group-rule/delete/delete_test.go
GokceGK Dec 10, 2024
3d3f1a2
fix unit tests
GokceGK Dec 10, 2024
057dcd3
update docs
GokceGK Dec 10, 2024
1faa0be
Merge branch 'main' into gg/onboard-iaas-security-group-rule-commands
GokceGK Dec 10, 2024
19d1ee9
fix linter issues
GokceGK Dec 10, 2024
d86c412
fix unit tests
GokceGK Dec 10, 2024
2eafba0
apply acceptance feedbacks
GokceGK Dec 11, 2024
d95dfcf
add check for protocol if port range info is provided
GokceGK Dec 11, 2024
961bf2f
changed the flag description
GokceGK Dec 11, 2024
a038a4d
Merge branch 'main' into gg/onboard-iaas-security-group-rule-commands
GokceGK Dec 11, 2024
cbbd8ab
remove the flag control (api errors are sufficient)
GokceGK Dec 11, 2024
4251b97
edit flag descriptions
GokceGK Dec 12, 2024
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
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@ Help is available for any command by specifying the special flag `--help` (or si

Below you can find a list of the STACKIT services already available in the CLI (along with their respective command names) and the ones that are currently planned to be integrated.

| Service | CLI Commands | Status |
| ---------------------------------- |----------------------------------------------------------------------------------------------------------------------| ------------------------- |
| Observability | `observability` | :white_check_mark: |
| Infrastructure as a Service (IaaS) | `beta network-area` <br/> `beta network` <br/> `beta volume` <br/> `beta network-interface` <br/> `beta public-ip` <br/> `beta key-pair` | :white_check_mark: (beta) |
| Authorization | `project`, `organization` | :white_check_mark: |
| DNS | `dns` | :white_check_mark: |
| Kubernetes Engine (SKE) | `ske` | :white_check_mark: |
| Load Balancer | `load-balancer` | :white_check_mark: |
| LogMe | `logme` | :white_check_mark: |
| MariaDB | `mariadb` | :white_check_mark: |
| MongoDB Flex | `mongodbflex` | :white_check_mark: |
| Object Storage | `object-storage` | :white_check_mark: |
| OpenSearch | `opensearch` | :white_check_mark: |
| PostgreSQL Flex | `postgresflex` | :white_check_mark: |
| RabbitMQ | `rabbitmq` | :white_check_mark: |
| Redis | `redis` | :white_check_mark: |
| Resource Manager | `project` | :white_check_mark: |
| Secrets Manager | `secrets-manager` | :white_check_mark: |
| Server Backup Management | `beta server backup` | :white_check_mark: (beta) |
| Server Command (Run Command) | `beta server command` | :white_check_mark: (beta) |
| Service Account | `service-account` | :white_check_mark: |
| SQLServer Flex | `beta sqlserverflex` | :white_check_mark: (beta) |
| Service | CLI Commands | Status |
| ---------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------| ------------------------- |
| Observability | `observability` | :white_check_mark: |
| Infrastructure as a Service (IaaS) | `beta network-area` <br/> `beta network` <br/> `beta volume` <br/> `beta network-interface` <br/> `beta public-ip` <br/> `beta security-group` <br/> `beta key-pair` | :white_check_mark: (beta) |
| Authorization | `project`, `organization` | :white_check_mark: |
| DNS | `dns` | :white_check_mark: |
| Kubernetes Engine (SKE) | `ske` | :white_check_mark: |
| Load Balancer | `load-balancer` | :white_check_mark: |
| LogMe | `logme` | :white_check_mark: |
| MariaDB | `mariadb` | :white_check_mark: |
| MongoDB Flex | `mongodbflex` | :white_check_mark: |
| Object Storage | `object-storage` | :white_check_mark: |
| OpenSearch | `opensearch` | :white_check_mark: |
| PostgreSQL Flex | `postgresflex` | :white_check_mark: |
| RabbitMQ | `rabbitmq` | :white_check_mark: |
| Redis | `redis` | :white_check_mark: |
| Resource Manager | `project` | :white_check_mark: |
| Secrets Manager | `secrets-manager` | :white_check_mark: |
| Server Backup Management | `beta server backup` | :white_check_mark: (beta) |
| Server Command (Run Command) | `beta server command` | :white_check_mark: (beta) |
| Service Account | `service-account` | :white_check_mark: |
| SQLServer Flex | `beta sqlserverflex` | :white_check_mark: (beta) |

## Authentication

Expand Down
1 change: 1 addition & 0 deletions docs/stackit_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ stackit beta [flags]
* [stackit beta network-area](./stackit_beta_network-area.md) - Provides functionality for STACKIT Network Area (SNA)
* [stackit beta network-interface](./stackit_beta_network-interface.md) - Provides functionality for network interfaces
* [stackit beta public-ip](./stackit_beta_public-ip.md) - Provides functionality for public IPs
* [stackit beta security-group](./stackit_beta_security-group.md) - Provides functionality for security groups
* [stackit beta server](./stackit_beta_server.md) - Provides functionality for servers
* [stackit beta sqlserverflex](./stackit_beta_sqlserverflex.md) - Provides functionality for SQLServer Flex
* [stackit beta volume](./stackit_beta_volume.md) - Provides functionality for volumes
Expand Down
33 changes: 33 additions & 0 deletions docs/stackit_beta_security-group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## stackit beta security-group

Provides functionality for security groups

### Synopsis

Provides functionality for security groups.

```
stackit beta security-group [flags]
```

### Options

```
-h, --help Help for "stackit beta security-group"
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta](./stackit_beta.md) - Contains beta STACKIT CLI commands
* [stackit beta security-group rule](./stackit_beta_security-group_rule.md) - Provides functionality for security group rules

36 changes: 36 additions & 0 deletions docs/stackit_beta_security-group_rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## stackit beta security-group rule

Provides functionality for security group rules

### Synopsis

Provides functionality for security group rules.

```
stackit beta security-group rule [flags]
```

### Options

```
-h, --help Help for "stackit beta security-group rule"
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta security-group](./stackit_beta_security-group.md) - Provides functionality for security groups
* [stackit beta security-group rule create](./stackit_beta_security-group_rule_create.md) - Creates a security group rule
* [stackit beta security-group rule delete](./stackit_beta_security-group_rule_delete.md) - Deletes a security group rule
* [stackit beta security-group rule describe](./stackit_beta_security-group_rule_describe.md) - Shows details of a security group rule
* [stackit beta security-group rule list](./stackit_beta_security-group_rule_list.md) - Lists all security group rules in a security group of a project

60 changes: 60 additions & 0 deletions docs/stackit_beta_security-group_rule_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## stackit beta security-group rule create

Creates a security group rule

### Synopsis

Creates a security group rule.

```
stackit beta security-group rule create [flags]
```

### Examples

```
Create a security group rule for security group with ID "xxx" with direction "ingress"
$ stackit beta security-group rule create --security-group-id xxx --direction ingress

Create a security group rule for security group with ID "xxx" with direction "egress", protocol "icmp" and icmp parameters
$ stackit beta security-group rule create --security-group-id xxx --direction egress --protocol-name icmp --icmp-parameter-code 0 --icmp-parameter-type 8

Create a security group rule for security group with ID "xxx" with direction "ingress", protocol "tcp" and port range values
$ stackit beta security-group rule create --security-group-id xxx --direction ingress --protocol-name tcp --port-range-max 24 --port-range-min 22

Create a security group rule for security group with ID "xxx" with direction "ingress" and protocol number 1
$ stackit beta security-group rule create --security-group-id xxx --direction ingress --protocol-number 1
```

### Options

```
--description string The rule description
--direction string The direction of the traffic which the rule should match. The possible values are: "ingress", "egress"
--ether-type string The ethertype which the rule should match
-h, --help Help for "stackit beta security-group rule create"
--icmp-parameter-code int ICMP code. Can be set if the protocol is ICMP
--icmp-parameter-type int ICMP type. Can be set if the protocol is ICMP
--ip-range string The remote IP range which the rule should match
--port-range-max int The maximum port number. Should be greater or equal to the minimum. This should only be provided if the protocol is not ICMP
--port-range-min int The minimum port number. Should be less or equal to the maximum. This should only be provided if the protocol is not ICMP
--protocol-name string The protocol name which the rule should match. If a protocol is to be defined, either "protocol-name" or "protocol-number" must be provided
--protocol-number int The protocol number which the rule should match. If a protocol is to be defined, either "protocol-name" or "protocol-number" must be provided
--remote-security-group-id string The remote security group which the rule should match
--security-group-id string The security group ID
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta security-group rule](./stackit_beta_security-group_rule.md) - Provides functionality for security group rules

42 changes: 42 additions & 0 deletions docs/stackit_beta_security-group_rule_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## stackit beta security-group rule delete

Deletes a security group rule

### Synopsis

Deletes a security group rule.
If the security group rule is still in use, the deletion will fail


```
stackit beta security-group rule delete [flags]
```

### Examples

```
Delete security group rule with ID "xxx" in security group with ID "yyy"
$ stackit beta security-group rule delete xxx --security-group-id yyy
```

### Options

```
-h, --help Help for "stackit beta security-group rule delete"
--security-group-id string The security group ID
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta security-group rule](./stackit_beta_security-group_rule.md) - Provides functionality for security group rules

43 changes: 43 additions & 0 deletions docs/stackit_beta_security-group_rule_describe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## stackit beta security-group rule describe

Shows details of a security group rule

### Synopsis

Shows details of a security group rule.

```
stackit beta security-group rule describe [flags]
```

### Examples

```
Show details of a security group rule with ID "xxx" in security group with ID "yyy"
$ stackit beta security-group rule describe xxx --security-group-id yyy

Show details of a security group rule with ID "xxx" in security group with ID "yyy" in JSON format
$ stackit beta security-group rule describe xxx --security-group-id yyy --output-format json
```

### Options

```
-h, --help Help for "stackit beta security-group rule describe"
--security-group-id string The security group ID
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta security-group rule](./stackit_beta_security-group_rule.md) - Provides functionality for security group rules

47 changes: 47 additions & 0 deletions docs/stackit_beta_security-group_rule_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## stackit beta security-group rule list

Lists all security group rules in a security group of a project

### Synopsis

Lists all security group rules in a security group of a project.

```
stackit beta security-group rule list [flags]
```

### Examples

```
Lists all security group rules in security group with ID "xxx"
$ stackit beta security-group rule list --security-group-id xxx

Lists all security group rules in security group with ID "xxx" in JSON format
$ stackit beta security-group rule list --security-group-id xxx --output-format json

Lists up to 10 security group rules in security group with ID "xxx"
$ stackit beta security-group rule list --security-group-id xxx --limit 10
```

### Options

```
-h, --help Help for "stackit beta security-group rule list"
--limit int Maximum number of entries to list
--security-group-id string The security group ID
```

### 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
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```

### SEE ALSO

* [stackit beta security-group rule](./stackit_beta_security-group_rule.md) - Provides functionality for security group rules

Loading
Loading