This repository was archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompute.tf
More file actions
51 lines (43 loc) · 1.24 KB
/
compute.tf
File metadata and controls
51 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## Static IP
resource "google_compute_address" "nextcloud-ip" {
name = "nextcloud-ip"
network_tier = "STANDARD"
}
## SSH Key
resource "google_compute_project_metadata_item" "ansible_ssh_key" {
key = "ssh-keys"
value = file(var.ansiblekey)
}
## Compute Engine Instance
resource "google_compute_instance" "nextcloud-web" {
name = "nextcloud-web"
machine_type = "e2-micro"
zone = "us-west1-b"
tags = ["nextcloud-web", "health-check", "ssh"]
boot_disk {
device_name = "nextcloud-os"
initialize_params {
image = "projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20230714"
type = "pd-standard"
}
}
deletion_protection = true
enable_display = false
network_interface {
network = google_compute_network.nextcloud-network.name
subnetwork = google_compute_subnetwork.nextcloud-subnet.name
access_config {
network_tier = "STANDARD"
nat_ip = google_compute_address.nextcloud-ip.address
}
}
scheduling {
on_host_maintenance = "MIGRATE"
provisioning_model = "STANDARD"
}
shielded_instance_config {
enable_integrity_monitoring = true
enable_secure_boot = true
enable_vtpm = true
}
}