Difference between revisions of "Terraform resource: google compute instance"
Jump to navigation
Jump to search
(Created page with " * https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance {{tf GCP}}") |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | * <code>[[google_compute_instance]]</code> https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance | ||
− | + | resource "google_compute_instance" "ubuntu_instance" { | |
+ | name = "ubuntu-instance" | ||
+ | machine_type = "[[e2-micro]]" | ||
+ | zone = "[[us-west1]]-a" | ||
+ | |||
+ | boot_disk { | ||
+ | initialize_params { | ||
+ | image = "ubuntu-os-cloud/[[ubuntu-2204-lts]]" | ||
+ | } | ||
+ | } | ||
+ | |||
+ | network_interface { | ||
+ | network = "default" | ||
+ | access_config { | ||
+ | // Ephemeral public IP | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | == Related == | ||
+ | * <code>[[machine_type]]</code> | ||
+ | == See also == | ||
+ | * {{google_compute_instance}} | ||
+ | * {{tf GCP}} | ||
− | + | [[Category:Terraform]] | |
+ | [[Category:GCP]] |
Latest revision as of 14:03, 27 January 2025
google_compute_instance
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance
resource "google_compute_instance" "ubuntu_instance" { name = "ubuntu-instance" machine_type = "e2-micro" zone = "us-west1-a" boot_disk { initialize_params { image = "ubuntu-os-cloud/ubuntu-2204-lts" } } network_interface { network = "default" access_config { // Ephemeral public IP } } }
Related[edit]
See also[edit]
- Terraform resource: google_compute_instance, compute.googleapis.com, google_project_service
- Terraform GCP: [
google_compute_instance | google_storage_bucket| default_object_access_control | default_object_acl | object_access_control | object_acl | google_container_node_pool | google_compute_address | google_compute_network | google_compute_subnetwork | google_iam_policy | google_project_service | google_service_account | google_compute_router | google_compute_router_nat | google_sql_database_instance
]
Advertising: