Skip to content

Commit f98c1fc

Browse files
authored
chore: replace deprecated server type with cx22 (#937)
Learn more: https://docs.hetzner.cloud/changelog#2024-06-06-old-server-types-with-shared-intel-vcpus-are-deprecated - Updated docs with newer server types - Use CPX server type for tests
1 parent ef50f2f commit f98c1fc

23 files changed

+38
-40
lines changed

internal/datacenter/data_source_list.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resource "hcloud_server" "workers" {
1212
1313
name = "node${count.index}"
1414
image = "debian-11"
15-
server_type = "cx31"
15+
server_type = "cx22"
1616
datacenter = element(data.hcloud_datacenters.datacenters.datacenters, count.index).name
1717
}
1818
```

internal/location/data_source_list.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resource "hcloud_server" "workers" {
1212
1313
name = "node${count.index}"
1414
image = "debian-11"
15-
server_type = "cx31"
15+
server_type = "cx22"
1616
location = element(data.hcloud_locations.locations.locations, count.index).name
1717
}
1818
```

internal/servertype/data_source_test.go

+7-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestAccHcloudDataSourceServerTypeTest(t *testing.T) {
1818
}
1919
stByName.SetRName("st_by_name")
2020
stByID := &servertype.DData{
21-
ServerTypeID: "1",
21+
ServerTypeID: "22",
2222
}
2323
stByID.SetRName("st_by_id")
2424
resource.ParallelTest(t, resource.TestCase{
@@ -32,18 +32,16 @@ func TestAccHcloudDataSourceServerTypeTest(t *testing.T) {
3232
),
3333

3434
Check: resource.ComposeTestCheckFunc(
35-
resource.TestCheckResourceAttr(stByName.TFID(), "id", "1"),
36-
resource.TestCheckResourceAttr(stByName.TFID(), "name", "cx11"),
37-
resource.TestCheckResourceAttr(stByName.TFID(), "description", "CX11"),
38-
resource.TestCheckResourceAttr(stByName.TFID(), "cores", "1"),
35+
resource.TestCheckResourceAttr(stByName.TFID(), "id", "22"),
36+
resource.TestCheckResourceAttr(stByName.TFID(), "name", "cpx11"),
37+
resource.TestCheckResourceAttr(stByName.TFID(), "cores", "2"),
3938
resource.TestCheckResourceAttr(stByName.TFID(), "memory", "2"),
4039
resource.TestCheckResourceAttr(stByName.TFID(), "architecture", "x86"),
4140
resource.TestCheckResourceAttr(stByName.TFID(), "included_traffic", "21990232555520"),
4241

43-
resource.TestCheckResourceAttr(stByID.TFID(), "id", "1"),
44-
resource.TestCheckResourceAttr(stByID.TFID(), "name", "cx11"),
45-
resource.TestCheckResourceAttr(stByID.TFID(), "description", "CX11"),
46-
resource.TestCheckResourceAttr(stByID.TFID(), "cores", "1"),
42+
resource.TestCheckResourceAttr(stByID.TFID(), "id", "22"),
43+
resource.TestCheckResourceAttr(stByID.TFID(), "name", "cpx11"),
44+
resource.TestCheckResourceAttr(stByID.TFID(), "cores", "2"),
4745
resource.TestCheckResourceAttr(stByID.TFID(), "memory", "2"),
4846
resource.TestCheckResourceAttr(stByID.TFID(), "architecture", "x86"),
4947
resource.TestCheckResourceAttr(stByID.TFID(), "included_traffic", "21990232555520"),

internal/teste2e/testing.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ import (
1818

1919
var (
2020
// TestImage is the system image that is used in all tests
21-
TestImage = getEnv("TEST_IMAGE", "ubuntu-22.04")
21+
TestImage = getEnv("TEST_IMAGE", "ubuntu-24.04")
2222

2323
// TestImage is the system image ID that is used in all tests
24-
TestImageID = getEnv("TEST_IMAGE_ID", "67794396")
24+
TestImageID = getEnv("TEST_IMAGE_ID", "161547269")
2525

2626
// TestServerType is the default server type used in all tests
27-
TestServerType = getEnv("TEST_SERVER_TYPE", "cx11")
27+
TestServerType = getEnv("TEST_SERVER_TYPE", "cpx11")
2828

2929
// TestServerTypeUpgrade is the upgrade server type used in all tests
30-
TestServerTypeUpgrade = getEnv("TEST_SERVER_TYPE_UPGRADE", "cx21")
30+
TestServerTypeUpgrade = getEnv("TEST_SERVER_TYPE_UPGRADE", "cpx21")
3131

3232
// TestArchitecture is the default architecture used in all tests, should match the architecture of the TestServerType.
3333
TestArchitecture = getEnv("TEST_ARCHITECTURE", string(hcloud.ArchitectureX86))

internal/volume/resource_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ func TestVolumeResource_WithServerMultipleVolumes(t *testing.T) {
205205
tmplMan := testtemplate.Manager{}
206206
resServer1 := &server.RData{
207207
Name: "some-server",
208-
Type: "cx11",
209-
Image: "ubuntu-20.04",
208+
Type: teste2e.TestServerType,
209+
Image: teste2e.TestImage,
210210
LocationName: teste2e.TestLocationName,
211211
}
212212
resServer1.SetRName("some-server")

website/docs/d/datacenters.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "hcloud_server" "workers" {
1919
2020
name = "node${count.index}"
2121
image = "debian-11"
22-
server_type = "cx31"
22+
server_type = "cx22"
2323
datacenter = element(data.hcloud_datacenters.ds.datacenters, count.index).name
2424
}
2525
```

website/docs/d/locations.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "hcloud_server" "workers" {
1919
2020
name = "node${count.index}"
2121
image = "debian-11"
22-
server_type = "cx31"
22+
server_type = "cx22"
2323
location = element(data.hcloud_locations.ds.locations, count.index).name
2424
}
2525
```

website/docs/d/primary_ip.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ data "hcloud_primary_ip" "ip_3" {
4141
resource "hcloud_server" "server_test" {
4242
name = "test-server"
4343
image = "ubuntu-20.04"
44-
server_type = "cx11"
44+
server_type = "cx22"
4545
datacenter = "fsn1-dc14"
4646
labels = {
4747
"test" : "tessst1"

website/docs/d/server_type.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Use this resource to get detailed information about specific Server Type.
1212
## Example Usage
1313
```hcl
1414
data "hcloud_server_type" "ds_1" {
15-
name = "cx11"
15+
name = "cx22"
1616
}
1717
data "hcloud_server_type" "ds_2" {
1818
id = 1

website/docs/r/firewall.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "hcloud_firewall" "myfirewall" {
3838
resource "hcloud_server" "node1" {
3939
name = "node1"
4040
image = "debian-11"
41-
server_type = "cx11"
41+
server_type = "cx22"
4242
firewall_ids = [hcloud_firewall.myfirewall.id]
4343
}
4444
```

website/docs/r/firewall_attachment.html.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ specified in that `hcloud_firewall_attachment`.
2121
```hcl
2222
resource "hcloud_server" "test_server" {
2323
name = "test-server"
24-
server_type = "cx11"
24+
server_type = "cx22"
2525
image = "ubuntu-20.04"
2626
}
2727
@@ -40,7 +40,7 @@ resource "hcloud_firewall_attachment" "fw_ref" {
4040
```hcl
4141
resource "hcloud_server" "test_server" {
4242
name = "test-server"
43-
server_type = "cx11"
43+
server_type = "cx22"
4444
image = "ubuntu-20.04"
4545
4646
labels = {
@@ -88,7 +88,7 @@ resource "hcloud_firewall" "deny_all" {
8888
8989
resource "hcloud_server" "test_server" {
9090
name = "test-server"
91-
server_type = "cx11"
91+
server_type = "cx22"
9292
image = "ubuntu-20.04"
9393
ignore_remote_firewall_ids = true
9494
firewall_ids = [

website/docs/r/floating_ip.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Provides a Hetzner Cloud Floating IP to represent a publicly-accessible static I
1616
resource "hcloud_server" "node1" {
1717
name = "node1"
1818
image = "debian-11"
19-
server_type = "cx11"
19+
server_type = "cx22"
2020
}
2121
2222
resource "hcloud_floating_ip" "master" {

website/docs/r/floating_ip_assignment.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource "hcloud_floating_ip_assignment" "main" {
2121
resource "hcloud_server" "node1" {
2222
name = "node1"
2323
image = "debian-11"
24-
server_type = "cx11"
24+
server_type = "cx22"
2525
datacenter = "fsn1-dc8"
2626
}
2727

website/docs/r/load_balancer.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Provides a Hetzner Cloud Load Balancer to represent a Load Balancer in the Hetzn
1515
```hcl
1616
resource "hcloud_server" "my_server" {
1717
name = "server-%d"
18-
server_type = "cx11"
18+
server_type = "cx22"
1919
image = "ubuntu-18.04"
2020
}
2121

website/docs/r/load_balancer_target.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Adds a target to a Hetzner Cloud Load Balancer.
1515
```hcl
1616
resource "hcloud_server" "my_server" {
1717
name = "my-server"
18-
server_type = "cx11"
18+
server_type = "cx22"
1919
image = "ubuntu-18.04"
2020
}
2121

website/docs/r/placement_group.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "hcloud_placement_group" "my-placement-group" {
2424
resource "hcloud_server" "node1" {
2525
name = "node1"
2626
image = "debian-11"
27-
server_type = "cx11"
27+
server_type = "cx22"
2828
placement_group_id = hcloud_placement_group.my-placement-group.id
2929
}
3030
```

website/docs/r/primary_ip.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ resource "hcloud_primary_ip" "main" {
3030
resource "hcloud_server" "server_test" {
3131
name = "test-server"
3232
image = "ubuntu-20.04"
33-
server_type = "cx11"
33+
server_type = "cx22"
3434
datacenter = "fsn1-dc14"
3535
labels = {
3636
"test" : "tessst1"

website/docs/r/rdns.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For servers:
1818
resource "hcloud_server" "node1" {
1919
name = "node1"
2020
image = "debian-11"
21-
server_type = "cx11"
21+
server_type = "cx22"
2222
}
2323
2424
resource "hcloud_rdns" "master" {

website/docs/r/server.html.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Provides an Hetzner Cloud server resource. This can be used to create, modify, a
1919
resource "hcloud_server" "node1" {
2020
name = "node1"
2121
image = "debian-11"
22-
server_type = "cx11"
22+
server_type = "cx22"
2323
public_net {
2424
ipv4_enabled = true
2525
ipv6_enabled = true
@@ -42,7 +42,7 @@ auto_delete = true
4242
resource "hcloud_server" "server_test" {
4343
name = "test-server"
4444
image = "ubuntu-20.04"
45-
server_type = "cx11"
45+
server_type = "cx22"
4646
datacenter = "fsn1-dc14"
4747
labels = {
4848
"test" : "tessst1"
@@ -70,7 +70,7 @@ resource "hcloud_network_subnet" "network-subnet" {
7070
7171
resource "hcloud_server" "server" {
7272
name = "server"
73-
server_type = "cx11"
73+
server_type = "cx22"
7474
image = "ubuntu-20.04"
7575
location = "nbg1"
7676
@@ -106,7 +106,7 @@ data "hcloud_image" "packer_snapshot" {
106106
resource "hcloud_server" "from_snapshot" {
107107
name = "from-snapshot"
108108
image = data.hcloud_image.packer_snapshot.id
109-
server_type = "cx11"
109+
server_type = "cx22"
110110
public_net {
111111
ipv4_enabled = true
112112
ipv6_enabled = true

website/docs/r/server_network.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ description: |-
1616
resource "hcloud_server" "node1" {
1717
name = "node1"
1818
image = "debian-11"
19-
server_type = "cx11"
19+
server_type = "cx22"
2020
}
2121
resource "hcloud_network" "mynet" {
2222
name = "my-net"

website/docs/r/snapshot.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Provides a Hetzner Cloud snapshot to represent an image with type snapshot in th
1616
resource "hcloud_server" "node1" {
1717
name = "node1"
1818
image = "debian-11"
19-
server_type = "cx11"
19+
server_type = "cx22"
2020
}
2121
2222
resource "hcloud_snapshot" "my-snapshot" {

website/docs/r/volume.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Provides a Hetzner Cloud volume resource to manage volumes.
1616
resource "hcloud_server" "node1" {
1717
name = "node1"
1818
image = "debian-11"
19-
server_type = "cx11"
19+
server_type = "cx22"
2020
}
2121
2222
resource "hcloud_volume" "master" {

website/docs/r/volume_attachment.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ resource "hcloud_volume_attachment" "main" {
2222
resource "hcloud_server" "node1" {
2323
name = "node1"
2424
image = "debian-11"
25-
server_type = "cx11"
25+
server_type = "cx22"
2626
datacenter = "nbg1-dc3"
2727
}
2828

0 commit comments

Comments
 (0)