Skip to content

Commit 19c9cf7

Browse files
committed
feat: Add support for encryption at rest
1 parent 18e1788 commit 19c9cf7

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "my_cluster" {
2424
|------|---------|
2525
| <a name="requirement_terraform"></a> [terraform](#requirement_terraform) | >= 0.13 |
2626
| <a name="requirement_random"></a> [random](#requirement_random) | >= 3.4.3 |
27-
| <a name="requirement_scaleway"></a> [scaleway](#requirement_scaleway) | >= 2.3.0 |
27+
| <a name="requirement_scaleway"></a> [scaleway](#requirement_scaleway) | >= 2.43.0 |
2828

2929
## Resources
3030

@@ -46,6 +46,7 @@ module "my_cluster" {
4646
| <a name="input_backup_same_region"></a> [backup_same_region](#input_backup_same_region) | Whether logical backups are stored in the same region as the database instance. | `bool` | `false` | no |
4747
| <a name="input_backup_schedule_frequency"></a> [backup_schedule_frequency](#input_backup_schedule_frequency) | Backup schedule frequency in hours. | `number` | `24` | no |
4848
| <a name="input_backup_schedule_retention"></a> [backup_schedule_retention](#input_backup_schedule_retention) | Backup schedule retention in days. | `number` | `7` | no |
49+
| <a name="input_enable_encryption"></a> [enable_encryption](#input_enable_encryption) | Enable encryption at rest for the Database Instance. | `bool` | `true` | no |
4950
| <a name="input_ha_enabled"></a> [ha_enabled](#input_ha_enabled) | Enable or disable high availability for the database instance. | `bool` | `false` | no |
5051
| <a name="input_private_network"></a> [private_network](#input_private_network) | Describes the private network you want to connect to your cluster. If not set, a public network will be provided. | ```object({ pn_id = string ip_net = optional(string) enable_ipam = optional(bool) })``` | `null` | no |
5152
| <a name="input_project_id"></a> [project_id](#input_project_id) | ID of the project the instance is associated with. Ressource will be created in the project set at the provider level if null. | `string` | `null` | no |

main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ resource "scaleway_rdb_instance" "this" {
1515
name = var.name
1616
node_type = var.node_type
1717

18-
volume_size_in_gb = var.volume_size_in_gb
19-
volume_type = var.volume_type
18+
encryption_at_rest = var.enable_encryption
19+
volume_size_in_gb = var.volume_size_in_gb
20+
volume_type = var.volume_type
2021

2122
user_name = var.user_name
2223
password = var.user_password != null ? var.user_password : random_password.this[0].result

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ variable "private_network" {
3838
}
3939

4040
## Storage
41+
variable "enable_encryption" {
42+
description = "Enable encryption at rest for the Database Instance."
43+
type = bool
44+
default = true
45+
}
46+
4147
variable "volume_type" {
4248
description = "Type of volume where data are stored (bssd or lssd)."
4349
type = string

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ terraform {
77
}
88
scaleway = {
99
source = "scaleway/scaleway"
10-
version = ">= 2.3.0"
10+
version = ">= 2.43.0"
1111
}
1212
}
1313
}

0 commit comments

Comments
 (0)