Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions content/en/docs/06_cloudscale/2-persistent-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,9 @@ The AlpDeploy web service needs persistent storage that survives server re-creat
example for uploaded files or a local cache. cloudscale.ch provides SSD and bulk block
volumes that can be attached to servers.

Add the following resource to `main.tf`:
Add the `"cloudscale_volume" "web_data"` resource to `main.tf`:

```terraform
locals {
prefix = "alpdeploy-${var.username}"
}

resource "cloudscale_server" "web" {
name = "${local.prefix}-web"
flavor_slug = "flex-4-2"
image_slug = "debian-13"
zone_slug = var.zone
volume_size_gb = 10
ssh_keys = [var.ssh_public_key]
user_data = file("${path.module}/cloud-init/web.yaml")
}

resource "cloudscale_volume" "web_data" {
name = "${local.prefix}-web-data"
zone_slug = var.zone
Expand Down
10 changes: 1 addition & 9 deletions content/en/docs/06_cloudscale/3-private-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ runcmd:
- systemctl start nginx
```

Update `main.tf` to add the private interface to the web server:
Update `main.tf` and addthe private interface to the web server `"cloudscale_server" "web"` resource:

```terraform
locals {
Expand Down Expand Up @@ -190,14 +190,6 @@ resource "cloudscale_server" "web" {
}
}
}

resource "cloudscale_volume" "web_data" {
name = "${local.prefix}-web-data"
zone_slug = var.zone
size_gb = 50
type = "ssd"
server_uuids = [cloudscale_server.web.id]
}
```

{{% alert title="Server replacement" color="secondary" %}}
Expand Down
Loading