Skip to content

Commit

Permalink
feat: update TPG version constraints to allow 4.0 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-foundation-bot committed Nov 16, 2021
1 parent 1fdf38e commit 248b914
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 55 deletions.
12 changes: 0 additions & 12 deletions examples/logs-slack-alerts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@
* limitations under the License.
*/

provider "google-beta" {
version = "~> 3.33"
project = var.project_id
region = var.region
}

provider "google" {
version = "~> 3.33"
project = var.project_id
region = var.region
}

module "log_slack_alerts_example" {
source = "../../"
project_id = var.project_id
Expand Down
29 changes: 29 additions & 0 deletions examples/logs-slack-alerts/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.0"
}
}
required_version = ">= 0.13"
}
16 changes: 0 additions & 16 deletions examples/pubsub_scheduled/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@
* limitations under the License.
*/

terraform {
required_version = ">= 0.12"
}

provider "google-beta" {
version = "~> 3.33"
project = var.project_id
region = var.region
}

provider "google" {
version = "~> 3.33"
project = var.project_id
region = var.region
}

resource "random_pet" "main" {
length = 2
separator = "-"
Expand Down
32 changes: 32 additions & 0 deletions examples/pubsub_scheduled/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.0"
}
random = {
source = "hashicorp/random"
}
}
required_version = ">= 0.13"
}
16 changes: 0 additions & 16 deletions examples/pubsub_scheduled_multiple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,6 @@
* limitations under the License.
*/

terraform {
required_version = ">= 0.12"
}

provider "google-beta" {
version = "~> 3.33"
project = var.project_id
region = var.region
}

provider "google" {
version = "~> 3.33"
project = var.project_id
region = var.region
}

module "pubsub_scheduled_1" {
source = "../../"
project_id = var.project_id
Expand Down
29 changes: 29 additions & 0 deletions examples/pubsub_scheduled_multiple/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.0"
}
}
required_version = ">= 0.13"
}
2 changes: 1 addition & 1 deletion modules/project_cleanup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ terraform {

google = {
source = "hashicorp/google"
version = "~> 3.53"
version = ">= 3.53, < 5.0"
}
}

Expand Down
20 changes: 11 additions & 9 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/

terraform {
required_version = ">= 0.12"
}

provider "google" {
version = "~> 3.53"
}

provider "google-beta" {
version = "~> 3.35"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 3.53"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 3.35"
}
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ terraform {

google = {
source = "hashicorp/google"
version = "~> 3.53"
version = ">= 3.53, < 5.0"
}
}

Expand Down

0 comments on commit 248b914

Please sign in to comment.