|
| 1 | + |
| 2 | +# A more full example of a "google_compute_instance". |
| 3 | +# Most of these settings don't need to be specified. |
| 4 | +# Adjust as needed. |
| 5 | +# The main.tf file is more appropriate. |
| 6 | + |
| 7 | +provider "google" { |
| 8 | + project = "boostorg-project1" |
| 9 | + region = "us-central1" |
| 10 | + zone = "us-central1-c" |
| 11 | +} |
| 12 | + |
| 13 | +resource "google_compute_instance" "example" { |
| 14 | + allow_stopping_for_update = null |
| 15 | + can_ip_forward = false |
| 16 | + deletion_protection = false |
| 17 | + description = null |
| 18 | + desired_status = null |
| 19 | + enable_display = false |
| 20 | + hostname = null |
| 21 | + key_revocation_action_type = "NONE" |
| 22 | + labels = {} |
| 23 | + machine_type = "n2-standard-2" |
| 24 | + metadata = {} |
| 25 | + metadata_startup_script = null |
| 26 | + min_cpu_platform = null |
| 27 | + name = "lists" |
| 28 | + resource_policies = [] |
| 29 | + tags = ["elasticsearch", "munin", "nrpe", "email", "http-server", "https-server", "lb-health-check", "mailman3-core", "postgres-client", "prometheus"] |
| 30 | + zone = "us-central1-c" |
| 31 | + boot_disk { |
| 32 | + auto_delete = true |
| 33 | + device_name = "lists" |
| 34 | + disk_encryption_key_raw = null # sensitive |
| 35 | + interface = null |
| 36 | + kms_key_self_link = null |
| 37 | + mode = "READ_WRITE" |
| 38 | + # source = "https://www.googleapis.com/compute/v1/projects/boostorg-project1/zones/us-central1-c/disks/mm3-test" |
| 39 | + initialize_params { |
| 40 | + enable_confidential_compute = false |
| 41 | + image = "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-2404-noble-amd64-v20241004" |
| 42 | + labels = {} |
| 43 | + provisioned_iops = 0 |
| 44 | + provisioned_throughput = 0 |
| 45 | + resource_manager_tags = {} |
| 46 | + resource_policies = [] |
| 47 | + size = 50 |
| 48 | + storage_pool = null |
| 49 | + type = "pd-balanced" |
| 50 | + } |
| 51 | + } |
| 52 | + confidential_instance_config { |
| 53 | + confidential_instance_type = null |
| 54 | + enable_confidential_compute = false |
| 55 | + } |
| 56 | + network_interface { |
| 57 | + internal_ipv6_prefix_length = 0 |
| 58 | + ipv6_address = null |
| 59 | + network = "https://www.googleapis.com/compute/v1/projects/boostorg-project1/global/networks/default" |
| 60 | + network_ip = "10.128.0.15" |
| 61 | + nic_type = null |
| 62 | + queue_count = 0 |
| 63 | + stack_type = "IPV4_ONLY" |
| 64 | + subnetwork = "https://www.googleapis.com/compute/v1/projects/boostorg-project1/regions/us-central1/subnetworks/default" |
| 65 | + subnetwork_project = "boostorg-project1" |
| 66 | + access_config { |
| 67 | + nat_ip = "104.154.182.161" |
| 68 | + network_tier = "PREMIUM" |
| 69 | + public_ptr_domain_name = null |
| 70 | + } |
| 71 | + } |
| 72 | + reservation_affinity { |
| 73 | + type = "ANY_RESERVATION" |
| 74 | + } |
| 75 | + scheduling { |
| 76 | + automatic_restart = true |
| 77 | + instance_termination_action = null |
| 78 | + min_node_cpus = 0 |
| 79 | + on_host_maintenance = "MIGRATE" |
| 80 | + preemptible = false |
| 81 | + provisioning_model = "STANDARD" |
| 82 | + } |
| 83 | + service_account { |
| 84 | + |
| 85 | + scopes = ["https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/trace.append"] |
| 86 | + } |
| 87 | + shielded_instance_config { |
| 88 | + enable_integrity_monitoring = true |
| 89 | + enable_secure_boot = false |
| 90 | + enable_vtpm = true |
| 91 | + } |
| 92 | +} |
| 93 | + |
0 commit comments