https://github.com/happypathway/terraform-google-compute-instance
Creates an Instance in GCP
https://github.com/happypathway/terraform-google-compute-instance
Last synced: 3 months ago
JSON representation
Creates an Instance in GCP
- Host: GitHub
- URL: https://github.com/happypathway/terraform-google-compute-instance
- Owner: HappyPathway
- Created: 2018-10-03T22:31:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T22:31:59.000Z (over 7 years ago)
- Last Synced: 2025-02-25T15:42:14.538Z (over 1 year ago)
- Language: HCL
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# terraform-google-compute-instance
- Separated disk and static ip for better manageability
- Substitutes `$$REGION` and `$$ZONE` in user-data
## Usage:
Creates 3 instances and IP addresses with names `test-1`, `test-2` and `test-3`. Machine type can be changed without destroying the boot disk.
```
data "google_compute_image" "coreos_stable" {
family = "coreos-stable"
project = "coreos-cloud"
}
module "gci_test" {
source = "github.com/matti/terraform-google-compute-instance"
amount = 3
region = "us-east1"
name_prefix = "test"
machine_type = "custom-2-2048"
disk_size = "32"
disk_image = "${data.google_compute_image.coreos_stable.self_link}"
subnetwork = "${resource.google_compute_subnetwork.new_subnetwork.self_link}"
}
```