File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
examples/templates/aws-devcontainer Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,19 @@ data "coder_parameter" "instance_type" {
88
88
}
89
89
}
90
90
91
+ data "coder_parameter" "root_volume_size_gb" {
92
+ name = " root_volume_size_gb"
93
+ display_name = " Root Volume Size (GB)"
94
+ description = " How large should the root volume for the instance be?"
95
+ default = 30
96
+ type = " number"
97
+ mutable = true
98
+ validation {
99
+ min = 1
100
+ monotonic = " increasing"
101
+ }
102
+ }
103
+
91
104
data "coder_parameter" "fallback_image" {
92
105
default = " codercom/enterprise-base:ubuntu"
93
106
description = " This image runs if the devcontainer fails to build."
@@ -197,6 +210,11 @@ locals {
197
210
shell: /bin/bash
198
211
ssh_authorized_keys:
199
212
- "${ data . coder_parameter . ssh_pubkey . value } "
213
+ # Automatically grow the partition
214
+ growpart:
215
+ mode: auto
216
+ devices: ['/']
217
+ ignore_growroot_disabled: false
200
218
201
219
--//
202
220
Content-Type: text/x-shellscript; charset="us-ascii"
@@ -268,7 +286,7 @@ resource "aws_instance" "vm" {
268
286
instance_type = data. coder_parameter . instance_type . value
269
287
iam_instance_profile = try (data. aws_iam_instance_profile . vm_instance_profile [0 ]. name , null )
270
288
root_block_device {
271
- volume_size = 30
289
+ volume_size = data . coder_parameter . root_volume_size_gb . value
272
290
}
273
291
274
292
user_data = local. user_data
You can’t perform that action at this time.
0 commit comments