Skip to content

Commit

Permalink
fix: Switch shared_vpc resources to beta provider in access submodule (
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb authored Mar 29, 2021
1 parent ffb19a7 commit 5b00673
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/fabric-net-svpc-access/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/

resource "google_compute_shared_vpc_service_project" "projects" {
provider = google-beta

count = var.service_project_num
host_project = var.host_project_id
service_project = element(var.service_project_ids, count.index)
Expand Down
7 changes: 7 additions & 0 deletions modules/fabric-net-svpc-access/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ terraform {
source = "hashicorp/google"
version = "<4.0,>= 2.12"
}
google-beta = {
source = "hashicorp/google-beta"
version = "<4.0,>= 2.12"
}
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-network:fabric-net-svpc-access/v3.2.0"
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-google-network:fabric-net-svpc-access/v3.2.0"
}
}
2 changes: 2 additions & 0 deletions modules/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ resource "google_compute_network" "network" {
Shared VPC
*****************************************/
resource "google_compute_shared_vpc_host_project" "shared_vpc_host" {
provider = google-beta

count = var.shared_vpc_host ? 1 : 0
project = var.project_id
depends_on = [google_compute_network.network]
Expand Down
7 changes: 7 additions & 0 deletions modules/vpc/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ terraform {
source = "hashicorp/google"
version = "~> 3.45"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.45"
}
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-network:vpc/v3.2.0"
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-google-network:vpc/v3.2.0"
}
}

0 comments on commit 5b00673

Please sign in to comment.