File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
scratch/resourcepool-gcp-disk Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 63
63
| 2.18.x | December 03, 2024 | Mainline |
64
64
| 2.19.x | January 07, 2024 | Not Released |
65
65
66
-
67
66
> ** Tip** : We publish a
68
67
> [ ` preview ` ] ( https://github.com/coder/coder/pkgs/container/coder-preview ) image
69
68
> ` ghcr.io/coder/coder-preview ` on each commit to the ` main ` branch. This can be
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ coder = {
4
+ source = " coder/coder"
5
+ }
6
+ google = {
7
+ source = " hashicorp/google"
8
+ }
9
+ }
10
+ }
11
+
12
+ locals {
13
+ name = " matifali"
14
+ project_id = " coder-dev-1"
15
+ zone = " asia-south1-a"
16
+ }
17
+
18
+ provider "random" {}
19
+
20
+ provider "google" {
21
+ zone = local. zone
22
+ project = local. project_id
23
+ }
24
+
25
+ resource "random_string" "disk_name" {
26
+ length = 16
27
+ special = false
28
+ upper = false
29
+ numeric = false
30
+ }
31
+
32
+ resource "google_compute_disk" "example_disk" {
33
+ name = " ${ local . name } disk-${ random_string . disk_name . result } "
34
+ type = " pd-standard"
35
+ size = 3 # Disk size in GB
36
+ }
37
+
38
+ resource "coder_pool_resource_claimable" "prebuilt_disk" {
39
+ other {
40
+ instance_id = google_compute_disk. example_disk . id
41
+ }
42
+ }
You can’t perform that action at this time.
0 commit comments