Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Add network_profile setting to network, update network resource provider #584

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module "vpc" {
enable_ipv6_ula = var.enable_ipv6_ula
internal_ipv6_range = var.internal_ipv6_range
network_firewall_policy_enforcement_order = var.network_firewall_policy_enforcement_order
network_profile = var.network_profile
}

/******************************************
Expand Down
2 changes: 2 additions & 0 deletions modules/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
VPC configuration
*****************************************/
resource "google_compute_network" "network" {
provider = google-beta
name = var.network_name
auto_create_subnetworks = var.auto_create_subnetworks
routing_mode = var.routing_mode
Expand All @@ -28,6 +29,7 @@ resource "google_compute_network" "network" {
enable_ula_internal_ipv6 = var.enable_ipv6_ula
internal_ipv6_range = var.internal_ipv6_range
network_firewall_policy_enforcement_order = var.network_firewall_policy_enforcement_order
network_profile = var.network_profile
}

/******************************************
Expand Down
12 changes: 12 additions & 0 deletions modules/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,15 @@ variable "network_firewall_policy_enforcement_order" {
default = null
description = "Set the order that Firewall Rules and Firewall Policies are evaluated. Valid values are `BEFORE_CLASSIC_FIREWALL` and `AFTER_CLASSIC_FIREWALL`. (default null or equivalent to `AFTER_CLASSIC_FIREWALL`)"
}

variable "network_profile" {
type = string
default = null
description = <<-EOT
"A full or partial URL of the network profile to apply to this network.
This field can be set only at resource creation time. For example, the
following are valid URLs:
* https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
* projects/{projectId}/global/networkProfiles/{network_profile_name}
EOT
}
2 changes: 1 addition & 1 deletion modules/vpc/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ terraform {
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.64, < 7"
version = ">= 6.13.0, < 7"
cdunbar13 marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,15 @@ variable "network_firewall_policy_enforcement_order" {
default = null
description = "Set the order that Firewall Rules and Firewall Policies are evaluated. Valid values are `BEFORE_CLASSIC_FIREWALL` and `AFTER_CLASSIC_FIREWALL`. (default null or equivalent to `AFTER_CLASSIC_FIREWALL`)"
}

variable "network_profile" {
type = string
default = null
description = <<-EOT
"A full or partial URL of the network profile to apply to this network.
This field can be set only at resource creation time. For example, the
following are valid URLs:
* https://www.googleapis.com/compute/beta/projects/{projectId}/global/networkProfiles/{network_profile_name}
* projects/{projectId}/global/networkProfiles/{network_profile_name}
EOT
}
Loading