Skip to content

Commit

Permalink
Merge pull request #5 from riveraja/compute_updates
Browse files Browse the repository at this point in the history
Updates to compute_network parameters
  • Loading branch information
riveraja authored Jul 29, 2024
2 parents 56e9a00 + f7cb3fe commit cff88e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions gcp/compute_engine/compute.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ resource "google_compute_instance" "default" {
}

network_interface {
network = data.google_compute_network.default.id
subnetwork = data.google_compute_subnetwork.default.id
access_config {
network_tier = "PREMIUM"
Expand Down
6 changes: 5 additions & 1 deletion gcp/compute_engine/data.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
data "google_compute_subnetwork" "default" {
name = var.compute_subnetwork_name
name = var.google_compute_subnetwork
}

data "google_compute_network" "default" {
name = var.google_compute_network
}
11 changes: 8 additions & 3 deletions gcp/compute_engine/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ variable "instance_termination_action" {
default = "STOP"
}

variable "compute_subnetwork_name" {
type = string
default = "default"
variable "google_compute_subnetwork" {
type = string
# default = "default"
}

variable "google_compute_network" {
type = string
# default = "default"
}

variable "instance_name" {
Expand Down

0 comments on commit cff88e1

Please sign in to comment.