File tree Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Expand file tree Collapse file tree 2 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -65,16 +65,16 @@ resource "scaleway_instance_ip" "public_ip_backup" {
6565 project_id = var.project_id
6666}
6767
68- resource "scaleway_instance_volume " "data" {
68+ resource "scaleway_block_volume " "data" {
6969 project_id = var.project_id
7070 size_in_gb = 30
71- type = "l_ssd"
71+ iops = 5000
7272}
7373
74- resource "scaleway_instance_volume " "data_backup" {
74+ resource "scaleway_block_volume " "data_backup" {
7575 project_id = var.project_id
7676 size_in_gb = 10
77- type = "l_ssd"
77+ iops = 5000
7878}
7979
8080resource "scaleway_instance_security_group" "www" {
@@ -108,10 +108,9 @@ resource "scaleway_instance_server" "web" {
108108
109109 ip_id = scaleway_instance_ip.public_ip.id
110110
111- additional_volume_ids = [scaleway_instance_volume .data.id]
111+ additional_volume_ids = [scaleway_block_volume .data.id]
112112
113113 root_volume {
114- # The local storage of a DEV1-L instance is 80 GB, subtract 30 GB from the additional l_ssd volume, then the root volume needs to be 50 GB.
115114 size_in_gb = 50
116115 }
117116
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ resource "scaleway_instance_server" "web" {
2626### With additional volumes and tags
2727
2828``` terraform
29- resource "scaleway_instance_volume " "data" {
29+ resource "scaleway_block_volume " "data" {
3030 size_in_gb = 100
31- type = "b_ssd"
31+ iops = 5000
3232}
3333
3434resource "scaleway_instance_server" "web" {
@@ -41,7 +41,7 @@ resource "scaleway_instance_server" "web" {
4141 delete_on_termination = false
4242 }
4343
44- additional_volume_ids = [ scaleway_instance_volume .data.id ]
44+ additional_volume_ids = [ scaleway_block_volume .data.id ]
4545}
4646```
4747
@@ -137,7 +137,6 @@ resource "scaleway_instance_server" "image" {
137137 type = "PRO2-XXS"
138138 image = "ubuntu_jammy"
139139 root_volume {
140- volume_type = "b_ssd"
141140 size_in_gb = 100
142141 }
143142}
@@ -146,19 +145,20 @@ resource "scaleway_instance_server" "image" {
146145#### From snapshot
147146
148147``` terraform
149- data "scaleway_instance_snapshot " "snapshot" {
148+ data "scaleway_block_snapshot " "snapshot" {
150149 name = "my_snapshot"
151150}
152151
153- resource "scaleway_instance_volume " "from_snapshot" {
154- from_snapshot_id = data.scaleway_instance_snapshot .snapshot.id
155- type = "b_ssd"
152+ resource "scaleway_block_volume " "from_snapshot" {
153+ snapshot_id = data.scaleway_block_snapshot .snapshot.id
154+ iops = 5000
156155}
157156
158157resource "scaleway_instance_server" "from_snapshot" {
159158 type = "PRO2-XXS"
160159 root_volume {
161- volume_id = scaleway_instance_volume.from_snapshot.id
160+ volume_id = scaleway_block_volume.from_snapshot.id
161+ volume_type = "sbs_volume"
162162 }
163163}
164164```
You can’t perform that action at this time.
0 commit comments