diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 00000000..ab2c6ed4 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,41 @@ +name: Links + +on: + pull_request: + workflow_dispatch: + schedule: + - cron: "43 12 * * *" + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - uses: actions/cache@v4 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + + - uses: lycheeverse/lychee-action@v2 + with: + fail: true + args: > + --root-dir ${{ github.workspace }} + --verbose + --no-progress + --cache + --max-cache-age 2d + --include-fragments + --exclude 'api.hetzner.cloud' + --exclude 'api.hetzner.com' + --exclude 'codecov.io' + --exclude 'github.com' + --exclude '169.254.169.254' + --exclude 'https://docs.hetzner.cloud/changelog#new-product' + --exclude 'https://style-guide.europa.eu/en/content/-/isg/topic' + --exclude 'https://www.hetzner.com/news/arm64-cloud' + '**/*.md' + '**/*.go' diff --git a/CHANGELOG.md b/CHANGELOG.md index a08b15f0..a5b11589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,7 +80,7 @@ hcloud storage-box enable-snapshot-plan backups \ This release adds support for the new [DNS API](https://docs.hetzner.cloud/reference/cloud#dns). -The DNS API is currently in **beta**, which will likely end on 10 November 2025. After the beta ended, it will no longer be possible to create new zones in the old DNS system. See the [DNS Beta FAQ](https://docs.hetzner.com/networking/dns/faq/beta) for more details. +The DNS API is currently in **beta**, which will likely end on 10 November 2025. After the beta ended, it will no longer be possible to create new zones in the old DNS system. See the [DNS Beta FAQ](https://docs.hetzner.com/networking/dns/faq/beta/) for more details. Future minor releases of this project may include breaking changes for features that are related to the DNS API. diff --git a/docs/README.md b/docs/README.md index 26087836..df039c64 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,4 +11,4 @@ This documentation is written and organized following the [Diátaxis](https://di ## Getting help - 🐛 Report bugs using [our issue tracker](https://github.com/hetznercloud/cli/issues/new?template=bug.yaml). -- 🙋 If you need help, reach us using the [Support Center](https://console.hetzner.cloud/support). +- 🙋 If you need help, reach us using the [Support Center](https://console.hetzner.com/support). diff --git a/docs/guides/using-output-options.md b/docs/guides/using-output-options.md index a69f7c67..e5f6c0fa 100644 --- a/docs/guides/using-output-options.md +++ b/docs/guides/using-output-options.md @@ -116,7 +116,7 @@ $ hcloud location list --output yaml | yq '.[] | [{"id": .id, "name": .name}]' ## Go Template Format `describe` commands support the Go string template format as well. You can read up on the syntax in the -[Go documentation](https://pkg.go.dev/text/template/). The data structures passed to the template are defined +[Go documentation](https://pkg.go.dev/text/template). The data structures passed to the template are defined by our API and can be found in [hcloud-go](https://pkg.go.dev/github.com/hetznercloud/hcloud-go/v2/hcloud/schema). For example, you could obtain the number of cores of a server using the following command: diff --git a/docs/reference/manual/hcloud_zone_change-primary-nameservers.md b/docs/reference/manual/hcloud_zone_change-primary-nameservers.md index 563f7405..c804b366 100644 --- a/docs/reference/manual/hcloud_zone_change-primary-nameservers.md +++ b/docs/reference/manual/hcloud_zone_change-primary-nameservers.md @@ -6,7 +6,8 @@ Changes the primary nameservers of a secondary Zone Changes the primary nameservers of a secondary Zone. -Input file has to be in JSON format. You can find the schema at https://docs.hetzner.cloud/reference/cloud#zone-actions-change-a-zone-primary-nameservers +Input file has to be in JSON format. You can find the schema at +https://docs.hetzner.cloud/reference/cloud#zone-actions-change-a-zones-primary-nameservers Example file content: diff --git a/docs/tutorials/setup-hcloud-cli.md b/docs/tutorials/setup-hcloud-cli.md index da764caa..d4bdf285 100644 --- a/docs/tutorials/setup-hcloud-cli.md +++ b/docs/tutorials/setup-hcloud-cli.md @@ -6,7 +6,7 @@ This tutorial will guide you through the process of setting up the hcloud CLI on Before you begin, ensure you have the following: -- A [Hetzner Cloud account](https://console.hetzner.cloud). +- A [Hetzner Cloud account](https://console.hetzner.com). ## 1. Install the hcloud CLI @@ -144,7 +144,7 @@ and source this file from your PowerShell profile. The hcloud CLI uses contexts to manage multiple Hetzner Cloud tokens and set configuration preferences. First, you need to create an API token. -Follow the instructions in the [Hetzner Cloud documentation](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token) to create your project API token. +Follow the instructions in the [Hetzner Cloud documentation](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/) to create your project API token. Once you have your token, you can create a context using the following command: @@ -179,4 +179,4 @@ ID NAME DESCRIPTION LOCATION If you see this output, congratulations! You have successfully set up the hcloud CLI on your local machine. If there are any problems, make sure you followed all steps of this tutorial correctly. If there still are problems, -you can reach out to our [Support](https://console.hetzner.cloud/support) to get help. +you can reach out to our [Support](https://console.hetzner.com/support) to get help. diff --git a/internal/cmd/config/add_test.go b/internal/cmd/config/add_test.go index 3cb0b397..1bc6e438 100644 --- a/internal/cmd/config/add_test.go +++ b/internal/cmd/config/add_test.go @@ -44,7 +44,7 @@ func TestAdd(t *testing.T) { token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -83,7 +83,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3", "a", "b", "c"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -111,7 +111,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3", "a", "b", "c"] @@ -140,7 +140,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -170,7 +170,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -204,7 +204,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] diff --git a/internal/cmd/config/get_test.go b/internal/cmd/config/get_test.go index 6e8ff071..99d89e42 100644 --- a/internal/cmd/config/get_test.go +++ b/internal/cmd/config/get_test.go @@ -34,7 +34,7 @@ func TestGet(t *testing.T) { name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -66,7 +66,7 @@ func TestGet(t *testing.T) { }, { key: "endpoint", - expOut: "https://test-endpoint.com\n", + expOut: "https://example.com\n", }, { key: "poll-interval", diff --git a/internal/cmd/config/list_test.go b/internal/cmd/config/list_test.go index 8e45aed2..85ea6d32 100644 --- a/internal/cmd/config/list_test.go +++ b/internal/cmd/config/list_test.go @@ -34,7 +34,7 @@ func TestList(t *testing.T) { name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -58,14 +58,14 @@ func TestList(t *testing.T) { { name: "default", args: []string{}, - expOut: `KEY VALUE -context test_context -debug yes -deeply.nested.option bar -endpoint https://test-endpoint.com -poll-interval 1.234s -quiet yes -token [redacted] + expOut: `KEY VALUE +context test_context +debug yes +deeply.nested.option bar +endpoint https://example.com +poll-interval 1.234s +quiet yes +token [redacted] `, }, { @@ -84,26 +84,26 @@ token { name: "no header", args: []string{"-o=noheader"}, - expOut: `context test_context -debug yes -deeply.nested.option bar -endpoint https://test-endpoint.com -poll-interval 1.234s -quiet yes -token [redacted] + expOut: `context test_context +debug yes +deeply.nested.option bar +endpoint https://example.com +poll-interval 1.234s +quiet yes +token [redacted] `, }, { name: "allow sensitive", args: []string{"--allow-sensitive"}, - expOut: `KEY VALUE -context test_context -debug yes -deeply.nested.option bar -endpoint https://test-endpoint.com -poll-interval 1.234s -quiet yes -token super secret token + expOut: `KEY VALUE +context test_context +debug yes +deeply.nested.option bar +endpoint https://example.com +poll-interval 1.234s +quiet yes +token super secret token `, }, { @@ -125,7 +125,7 @@ token super secret token }, { "key": "endpoint", - "value": "https://test-endpoint.com" + "value": "https://example.com" }, { "key": "poll-interval", @@ -165,6 +165,6 @@ token super secret token func setTestValues(cfg config.Config) { _ = os.Setenv("HCLOUD_POLL_INTERVAL", "1234ms") _ = os.Setenv("HCLOUD_DEBUG", "true") - _ = cfg.FlagSet().Set("endpoint", "https://test-endpoint.com") + _ = cfg.FlagSet().Set("endpoint", "https://example.com") _ = cfg.FlagSet().Set("quiet", "true") } diff --git a/internal/cmd/config/remove_test.go b/internal/cmd/config/remove_test.go index 133b3ee0..f89e2b2a 100644 --- a/internal/cmd/config/remove_test.go +++ b/internal/cmd/config/remove_test.go @@ -44,7 +44,7 @@ func TestRemove(t *testing.T) { token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -84,7 +84,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -111,7 +111,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1", "2", "3"] @@ -146,7 +146,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] array_option = ["1"] @@ -174,7 +174,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["1", "2", "3"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [[contexts]] diff --git a/internal/cmd/config/set_test.go b/internal/cmd/config/set_test.go index 76faf501..e21f4b87 100644 --- a/internal/cmd/config/set_test.go +++ b/internal/cmd/config/set_test.go @@ -52,7 +52,7 @@ func TestSet(t *testing.T) { name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [[contexts]] @@ -90,7 +90,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] debug_file = "debug.log" - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [[contexts]] @@ -123,7 +123,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [[contexts]] @@ -149,7 +149,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [[contexts]] @@ -174,7 +174,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] option = "bar" @@ -201,7 +201,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -230,7 +230,7 @@ active_context = "test_context" token = "super secret token" [contexts.preferences] array_option = ["a", "b", "c"] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [[contexts]] diff --git a/internal/cmd/config/unset_test.go b/internal/cmd/config/unset_test.go index b85e7eb7..484db476 100644 --- a/internal/cmd/config/unset_test.go +++ b/internal/cmd/config/unset_test.go @@ -43,7 +43,7 @@ func TestUnset(t *testing.T) { name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -85,7 +85,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" [contexts.preferences.deeply] [contexts.preferences.deeply.nested] option = "bar" @@ -122,7 +122,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -149,7 +149,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -187,7 +187,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -217,7 +217,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.deeply] [contexts.preferences.deeply.nested] @@ -245,7 +245,7 @@ active_context = "test_context" name = "test_context" token = "super secret token" [contexts.preferences] - endpoint = "https://test-endpoint.com" + endpoint = "https://example.com" quiet = true [contexts.preferences.nested] option = "foo" diff --git a/internal/cmd/server/request_console_test.go b/internal/cmd/server/request_console_test.go index 7c48d4e3..78b81ecc 100644 --- a/internal/cmd/server/request_console_test.go +++ b/internal/cmd/server/request_console_test.go @@ -29,7 +29,7 @@ func TestRequestConsole(t *testing.T) { Return(hcloud.ServerRequestConsoleResult{ Action: &hcloud.Action{ID: 789}, Password: "root-password", - WSSURL: "wss://console.hetzner.cloud/?token=123", + WSSURL: "wss://console.hetzner.com/?token=123", }, nil, nil) fx.ActionWaiter.EXPECT(). WaitForActions(gomock.Any(), gomock.Any(), &hcloud.Action{ID: 789}). @@ -40,7 +40,7 @@ func TestRequestConsole(t *testing.T) { require.NoError(t, err) assert.Empty(t, errOut) - assert.Equal(t, "Console for Server 123:\nWebSocket URL: wss://console.hetzner.cloud/?token=123\nVNC Password: root-password\n", out) + assert.Equal(t, "Console for Server 123:\nWebSocket URL: wss://console.hetzner.com/?token=123\nVNC Password: root-password\n", out) } func TestRequestConsoleJSON(t *testing.T) { @@ -60,7 +60,7 @@ func TestRequestConsoleJSON(t *testing.T) { Return(hcloud.ServerRequestConsoleResult{ Action: &hcloud.Action{ID: 789}, Password: "root-password", - WSSURL: "wss://console.hetzner.cloud/?token=123", + WSSURL: "wss://console.hetzner.com/?token=123", }, nil, nil) fx.ActionWaiter.EXPECT(). WaitForActions(gomock.Any(), gomock.Any(), &hcloud.Action{ID: 789}). @@ -71,5 +71,5 @@ func TestRequestConsoleJSON(t *testing.T) { require.NoError(t, err) assert.Empty(t, errOut) - assert.JSONEq(t, `{"wss_url": "wss://console.hetzner.cloud/?token=123", "password": "root-password"}`, out) + assert.JSONEq(t, `{"wss_url": "wss://console.hetzner.com/?token=123", "password": "root-password"}`, out) } diff --git a/internal/cmd/zone/change_primary_nameservers.go b/internal/cmd/zone/change_primary_nameservers.go index b6f69bc1..1f5dbba4 100644 --- a/internal/cmd/zone/change_primary_nameservers.go +++ b/internal/cmd/zone/change_primary_nameservers.go @@ -24,7 +24,8 @@ var ChangePrimaryNameserversCmd = base.Cmd{ Short: "Changes the primary nameservers of a secondary Zone", Long: `Changes the primary nameservers of a secondary Zone. -Input file has to be in JSON format. You can find the schema at https://docs.hetzner.cloud/reference/cloud#zone-actions-change-a-zone-primary-nameservers +Input file has to be in JSON format. You can find the schema at +https://docs.hetzner.cloud/reference/cloud#zone-actions-change-a-zones-primary-nameservers Example file content: