Skip to content

Commit

Permalink
Merge branch 'master' into go_124
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone authored Feb 26, 2025
2 parents 0e97595 + 8d67cdf commit 7a50c72
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/purge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Manual Purge
on:
workflow_dispatch:

jobs:
sweepers:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: Run Sweepers
run: go run -v ./cmd/scw-sweeper
env:
SCW_DEBUG: 1
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USAGE:

ARGS:
[project-id] (Optional) ID of the Project containing the Audit Trail events
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iamx_user | iamx_application | iamx_group | iamx_policy | iamx_api_key | iamx_ssh_key)
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl | keym_key | iam_user | iam_application | iam_group | iam_policy | iam_api_key | iam_ssh_key)
[method-name] (Optional) Name of the method or the API call performed
[status] (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied
[recorded-after] (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARGS:
[project-id] Filter by Project ID
[volume-id] Filter snapshots by the ID of the original volume
[name] Filter snapshots by their names
[tags.{index}] Filter by tags. Only snapshots with one or more matching tags will be returned
[organization-id] Filter by Organization ID
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/audit-trail.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ scw audit-trail event list [arg=value ...]
| Name | | Description |
|------|---|-------------|
| project-id | | (Optional) ID of the Project containing the Audit Trail events |
| resource-type | One of: `unknown_type`, `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iamx_user`, `iamx_application`, `iamx_group`, `iamx_policy`, `iamx_api_key`, `iamx_ssh_key` | (Optional) Returns a paginated list of Scaleway resources' features |
| resource-type | One of: `unknown_type`, `secm_secret`, `secm_secret_version`, `kube_cluster`, `kube_pool`, `kube_node`, `kube_acl`, `keym_key`, `iam_user`, `iam_application`, `iam_group`, `iam_policy`, `iam_api_key`, `iam_ssh_key` | (Optional) Returns a paginated list of Scaleway resources' features |
| method-name | | (Optional) Name of the method or the API call performed |
| status | | (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied |
| recorded-after | | (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default |
Expand Down
1 change: 1 addition & 0 deletions docs/commands/block.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ scw block snapshot list [arg=value ...]
| project-id | | Filter by Project ID |
| volume-id | | Filter snapshots by the ID of the original volume |
| name | | Filter snapshots by their names |
| tags.{index} | | Filter by tags. Only snapshots with one or more matching tags will be returned |
| organization-id | | Filter by Organization ID |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `fr-par-3`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2`, `pl-waw-3`, `all` | Zone to target. If none is passed will use default zone from the config |

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250220095325-5f0d193bad95
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250225092007-04e9c0ceddea
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250220095325-5f0d193bad95 h1:nxkDpup9Wj9wBLZGQF4uDYkjBsmGVfPjkhWb3i5rpyk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250220095325-5f0d193bad95/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250225092007-04e9c0ceddea h1:4QAgjbHe9D9ka0Lw3fpZuFvZ09/CCPmaaFM9eSS7eeM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250225092007-04e9c0ceddea/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func auditTrailEventList() *core.Command {
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_type", "secm_secret", "secm_secret_version", "kube_cluster", "kube_pool", "kube_node", "kube_acl", "keym_key", "iamx_user", "iamx_application", "iamx_group", "iamx_policy", "iamx_api_key", "iamx_ssh_key"},
EnumValues: []string{"unknown_type", "secm_secret", "secm_secret_version", "kube_cluster", "kube_pool", "kube_node", "kube_acl", "keym_key", "iam_user", "iam_application", "iam_group", "iam_policy", "iam_api_key", "iam_ssh_key"},
},
{
Name: "method-name",
Expand Down
7 changes: 7 additions & 0 deletions internal/namespaces/block/v1alpha1/block_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,13 @@ func blockSnapshotList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "tags.{index}",
Short: `Filter by tags. Only snapshots with one or more matching tags will be returned`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "organization-id",
Short: `Filter by Organization ID`,
Expand Down

0 comments on commit 7a50c72

Please sign in to comment.