-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for glesys_server backupschedules
``` backups_schedule { frequency = "daily" retention = 7 } backups_schedule { frequency = "weekly" retention = 4 } ``` KVM backupschedule accTest
- Loading branch information
Showing
4 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,37 @@ resource "glesys_server" "kvm" { | |
} | ||
} | ||
# KVM with backups_schedule | ||
resource "glesys_server" "kvm" { | ||
datacenter = "Stockholm" | ||
memory = 1024 | ||
storage = 20 | ||
cpu = 1 | ||
bandwidth = 100 | ||
hostname = "www1" | ||
platform = "KVM" | ||
template = "debian-11" | ||
user { | ||
username = "alice" | ||
publickeys = [ | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINOCh8br7CwZDMGmINyJgBip943QXgkf7XdXrDMJf5Dl [email protected]", | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfN4dBsS2p1UX+DP6RicdxAYCCeRK8mzCldCS0W9A+5 [email protected]" | ||
] | ||
password = "hunter4!" | ||
} | ||
backups_schedule { | ||
frequency = "daily" | ||
retention = 7 | ||
} | ||
backups_schedule { | ||
frequency = "weekly" | ||
retention = 4 | ||
} | ||
} | ||
# Advanced example using variables | ||
# Set some variables | ||
variable "datacenter" { | ||
|
@@ -154,6 +185,7 @@ Examples can be found in the [GleSYS API - Cloud config documentation](https://g | |
|
||
### Optional | ||
|
||
- `backups_schedule` (Block Set) KVM Server backup schedule definition. (see [below for nested schema](#nestedblock--backups_schedule)) | ||
- `campaigncode` (String) Campaigncode used during creation for possible discount | ||
- `cloudconfig` (String) Cloudconfig used to provision server using a provided cloud-config mustache template. | ||
- `cloudconfigparams` (Map of String) Cloudconfigparams is used to provide additional parameters to the template in `cloudconfig` using a map. This can be set using a Terraform Local Value. | ||
|
@@ -174,6 +206,14 @@ Examples can be found in the [GleSYS API - Cloud config documentation](https://g | |
- `isrunning` (Boolean) Server running state | ||
- `network_adapters` (List of Object) Network adapters associated with the server. `glesys_networkadapter` (see [below for nested schema](#nestedatt--network_adapters)) | ||
|
||
<a id="nestedblock--backups_schedule"></a> | ||
### Nested Schema for `backups_schedule` | ||
|
||
Required: | ||
|
||
- `frequency` (String) | ||
- `retention` (Number) | ||
|
||
|
||
<a id="nestedblock--user"></a> | ||
### Nested Schema for `user` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,37 @@ resource "glesys_server" "kvm" { | |
} | ||
} | ||
|
||
# KVM with backups_schedule | ||
|
||
resource "glesys_server" "kvm" { | ||
datacenter = "Stockholm" | ||
memory = 1024 | ||
storage = 20 | ||
cpu = 1 | ||
bandwidth = 100 | ||
|
||
hostname = "www1" | ||
|
||
platform = "KVM" | ||
template = "debian-11" | ||
|
||
user { | ||
username = "alice" | ||
publickeys = [ | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINOCh8br7CwZDMGmINyJgBip943QXgkf7XdXrDMJf5Dl [email protected]", | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOfN4dBsS2p1UX+DP6RicdxAYCCeRK8mzCldCS0W9A+5 [email protected]" | ||
] | ||
password = "hunter4!" | ||
} | ||
backups_schedule { | ||
frequency = "daily" | ||
retention = 7 | ||
} | ||
backups_schedule { | ||
frequency = "weekly" | ||
retention = 4 | ||
} | ||
} | ||
# Advanced example using variables | ||
# Set some variables | ||
variable "datacenter" { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters