Skip to content

Commit a870b71

Browse files
authored
Addd regional support for serverbackup resource and data-source (#745)
* feat(serverbackup): add regional support * fix: corrections for review findings
1 parent 8b57c35 commit a870b71

11 files changed

Lines changed: 220 additions & 89 deletions

File tree

docs/data-sources/server_backup_schedule.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ data "stackit_server_backup_schedule" "example" {
3232
- `project_id` (String) STACKIT Project ID to which the server is associated.
3333
- `server_id` (String) Server ID for the backup schedule.
3434

35+
### Optional
36+
37+
- `region` (String) The resource region. If not defined, the provider region is used.
38+
3539
### Read-Only
3640

3741
- `backup_properties` (Attributes) Backup schedule details for the backups. (see [below for nested schema](#nestedatt--backup_properties))
@@ -48,3 +52,5 @@ Read-Only:
4852
- `name` (String)
4953
- `retention_period` (Number)
5054
- `volume_ids` (List of String)
55+
56+

docs/data-sources/server_backup_schedules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ data "stackit_server_backup_schedules" "example" {
3030
- `project_id` (String) STACKIT Project ID (UUID) to which the server is associated.
3131
- `server_id` (String) Server ID (UUID) to which the backup schedule is associated.
3232

33+
### Optional
34+
35+
- `region` (String) The resource region. If not defined, the provider region is used.
36+
3337
### Read-Only
3438

3539
- `id` (String) Terraform's internal data source identifier. It is structured as "`project_id`,`server_id`".
@@ -54,3 +58,5 @@ Read-Only:
5458
- `name` (String)
5559
- `retention_period` (Number)
5660
- `volume_ids` (List of String)
61+
62+

docs/resources/server_backup_schedule.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ resource "stackit_server_backup_schedule" "example" {
3535

3636
### Required
3737

38+
- `backup_properties` (Attributes) Backup schedule details for the backups. (see [below for nested schema](#nestedatt--backup_properties))
3839
- `enabled` (Boolean) Is the backup schedule enabled or disabled.
3940
- `name` (String) The schedule name.
4041
- `project_id` (String) STACKIT Project ID to which the server is associated.
@@ -43,12 +44,12 @@ resource "stackit_server_backup_schedule" "example" {
4344

4445
### Optional
4546

46-
- `backup_properties` (Attributes) Backup schedule details for the backups. (see [below for nested schema](#nestedatt--backup_properties))
47+
- `region` (String) The resource region. If not defined, the provider region is used.
4748

4849
### Read-Only
4950

5051
- `backup_schedule_id` (Number) Backup schedule ID.
51-
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`server_id`,`backup_schedule_id`".
52+
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`server_id`,`backup_schedule_id`".
5253

5354
<a id="nestedatt--backup_properties"></a>
5455
### Nested Schema for `backup_properties`
@@ -61,3 +62,5 @@ Required:
6162
Optional:
6263

6364
- `volume_ids` (List of String)
65+
66+

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/hashicorp/terraform-plugin-go v0.26.0
1212
github.com/hashicorp/terraform-plugin-log v0.9.0
1313
github.com/hashicorp/terraform-plugin-testing v1.11.0
14-
github.com/stackitcloud/stackit-sdk-go/core v0.16.0
14+
github.com/stackitcloud/stackit-sdk-go/core v0.16.2
1515
github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0
1616
github.com/stackitcloud/stackit-sdk-go/services/dns v0.13.0
1717
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.22.0
@@ -27,7 +27,7 @@ require (
2727
github.com/stackitcloud/stackit-sdk-go/services/redis v0.21.0
2828
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.0
2929
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.0
30-
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.6.0
30+
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.1
3131
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v0.5.0
3232
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.0
3333
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.0.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN
151151
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
152152
github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=
153153
github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo=
154-
github.com/stackitcloud/stackit-sdk-go/core v0.16.0 h1:9caGZwGLZDyBBe6ojk9VR4B2m3/0H5It6znBz76sH1w=
155-
github.com/stackitcloud/stackit-sdk-go/core v0.16.0/go.mod h1:LRheSoXTFRHWAyA8Q9skWtWBp3ZZ+bFAKiKuf4lTDkE=
154+
github.com/stackitcloud/stackit-sdk-go/core v0.16.2 h1:F8A4P/LLlQSbz0S0+G3m8rb3BUOK6EcR/CKx5UQY5jQ=
155+
github.com/stackitcloud/stackit-sdk-go/core v0.16.2/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0=
156156
github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0 h1:JVEx/ouHB6PlwGzQa3ywyDym1HTWo3WgrxAyXprCnuM=
157157
github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0/go.mod h1:nVllQfYODhX1q3bgwVTLO7wHOp+8NMLiKbn3u/Dg5nU=
158158
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.6.0 h1:nSaSvo9o4c9KGc0vct+JWk5T49Ic6i3hzbLKviJtVhA=
@@ -185,8 +185,8 @@ github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.0 h1:fPCdQ
185185
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.13.0/go.mod h1:Hs8RwANfF2ZKqOowPBqMQqLoRHcMobiKAihWWirAdEU=
186186
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.0 h1:PwfpDFGUUJ8+Go5hJf+/hA5CHfY+DPS1cqIUYH+zWtE=
187187
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.11.0/go.mod h1:Hb21FmYP95q0fzOb9jk4/9CIxTsHzrSYDQZh6e82XUg=
188-
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.6.0 h1:cESGAkm0ftADRBfdbiyx3pp/KVQ8JgmUQdRzpwG61wE=
189-
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v0.6.0/go.mod h1:aYPLsiImzWaYXEfYIZ0wJnV56PwcR+buy8Xu9jjbfGA=
188+
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.1 h1:qujhShugc1290NQlPoNqsembqzot8aTToAdSsJg5WrM=
189+
github.com/stackitcloud/stackit-sdk-go/services/serverbackup v1.0.1/go.mod h1:e1fsQL24gTPXcMWptuslNscawmXv/PLUAFuw+sOofbc=
190190
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v0.5.0 h1:TMUxDh8XGgWUpnWo7GsawVq2ICDsy/r8dMlfC26MR5g=
191191
github.com/stackitcloud/stackit-sdk-go/services/serverupdate v0.5.0/go.mod h1:giHnHz3kHeLY8Av9MZLsyJlaTXYz+BuGqdP/SKB5Vo0=
192192
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.6.0 h1:y+XzJcntHJ7M+IWWvAUkiVFA8op+jZxwHs3ktW2aLoA=

0 commit comments

Comments
 (0)