forked from gruntwork-io/terratest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
34 lines (27 loc) · 1.13 KB
/
main.tf
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
# ---------------------------------------------------------------------------------------------------------------------
# DEPLOY A CLOUD INSTANCE RUNNING UBUNTU
# See test/terraform_gcp_example_test.go for how to write automated tests for this code.
# ---------------------------------------------------------------------------------------------------------------------
resource "google_compute_instance" "example" {
project = "${var.gcp_project_id}"
name = "${var.instance_name}"
machine_type = "${var.machine_type}"
zone = "${var.zone}"
boot_disk {
initialize_params {
image = "ubuntu-os-cloud/ubuntu-1604-lts"
}
}
network_interface {
network = "default"
access_config {}
}
}
# ---------------------------------------------------------------------------------------------------------------------
# CREATE A GOOGLE STORAGE BUCKET
# ---------------------------------------------------------------------------------------------------------------------
resource "google_storage_bucket" "example_bucket" {
project = "${var.gcp_project_id}"
name = "${var.bucket_name}"
location = "${var.bucket_location}"
}