File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
examples/basic_shared_vpc Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ the chosen shared subnet.
2626| ip\_ address | The internal IP address |
2727| ip\_ address\_ name | The name of the internal IP |
2828| project | Host project ID |
29- | service\_ project | Service project ID |
3029| subnet | Name of the host subnet |
3130
3231<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Original file line number Diff line number Diff line change @@ -53,3 +53,19 @@ resource "google_compute_address" "internal" {
5353}
5454# [END compute_shared_internal_ip_create]
5555
56+ # [START compute_shared_instance_create]
57+ resource "google_compute_instance" "default" {
58+ project = var. service_project
59+ zone = " us-central1-a"
60+ name = " my-vm"
61+ machine_type = " e2-medium"
62+ boot_disk {
63+ initialize_params {
64+ image = " debian-cloud/debian-9"
65+ }
66+ }
67+ network_interface {
68+ subnetwork = data. google_compute_subnetwork . subnet . self_link
69+ }
70+ }
71+ # [END compute_shared_instance_create]
Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ output "project" {
1919 description = " Host project ID"
2020}
2121
22- output "service_project" {
23- value = google_compute_shared_vpc_service_project. service1 . service_project
24- description = " Service project ID"
25- }
26-
2722output "ip_address_name" {
2823 value = google_compute_address. internal . name
2924 description = " The name of the internal IP"
You can’t perform that action at this time.
0 commit comments