Skip to content

Commit e8101cc

Browse files
authoredJul 25, 2024··
feat(server-type): mark included_traffic attribute as deprecated (#963)
The field is deprecated in the API and will be set to `null` in the API starting on 2024-08-05. This will show up as `0` in the terraform attribute. There is currently no alternative for this field in Terraform, as the pricing information is not being passed through. If you rely on this, please open an issue to request this with your use case. Learn more about this change on the [Hetzner Cloud Changelog](https://docs.hetzner.cloud/changelog#2024-07-25-cloud-api-returns-traffic-information-in-different-format).
1 parent 4ff53e7 commit e8101cc

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
 

‎internal/servertype/data_source.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ func getCommonDataSchema() map[string]*schema.Schema {
6767
Computed: true,
6868
},
6969
"included_traffic": {
70-
Type: schema.TypeInt,
71-
Computed: true,
70+
Type: schema.TypeInt,
71+
Deprecated: "The field is deprecated and will always report 0 after 2024-08-05.",
72+
Computed: true,
7273
},
7374
})
7475
}

‎website/docs/d/server_type.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data "hcloud_server_type" "ds_2" {
3030
- `memory` - (int) Memory a Server of this type will have in GB.
3131
- `disk` - (int) Disk size a Server of this type will have in GB.
3232
- `architecture` - (string) Architecture of the server_type.
33-
- `included_traffic` - (int) Free traffic per month in bytes.
33+
- `included_traffic` - (int) Free traffic per month in bytes. **Warning**: This field is deprecated and will report `0` after 2024-08-05.
3434
- `is_deprecated` - (bool) Deprecation status of server type.
3535
- `deprecation_announced` (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
3636
- `unavailable_after` (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.

‎website/docs/d/server_types.html.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ resource "hcloud_server" "workers" {
2323
```
2424

2525
## Attributes Reference
26-
- `server_types` - (list) List of all server types. See `data.hcloud_type` for schema.
26+
- `server_types` - (list) List of all server types. See `data.hcloud_server_type` for schema.

0 commit comments

Comments
 (0)
Please sign in to comment.