Skip to content

Commit

Permalink
fix: update TPG version constraints to allow 4.0 and TF v0.13+ format (
Browse files Browse the repository at this point in the history
…#700)

* fix: Uniform v4.5 Google provider

* fix: remove previous provider info from readme

* fix: update TPG version constraints to allow 4.0

* Update versions.tf

Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
  • Loading branch information
apeabody and bharathkkb authored Apr 12, 2022
1 parent d1d7624 commit b66a080
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 47 deletions.
18 changes: 2 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,10 @@ determining that location is as follows:
- [gcloud sdk](https://cloud.google.com/sdk/install) >= 269.0.0
- [jq](https://stedolan.github.io/jq/) >= 1.6
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.0
- [terraform-provider-google] plugin >= 3.1, < 4.0
- [terraform-provider-google-beta] plugin >= 3.1, < 4.0
- [terraform-provider-google] plugin ~> 4.5
- [terraform-provider-google-beta] plugin ~> 4.5
- [terraform-provider-gsuite] plugin 0.1.x if GSuite functionality is desired

#### `terraform-provider-google` version 2.x

Starting with version `6.3.0` of this module, `google_billing_budget` resources can now be created. This increases the minimum `terraform-provider-google` version to `3.1.0`

To continue to use a version `>= 2.1, < 3.1` of the google provider pin this module to `6.2.1`. Or use the `core_project_factory` submodule directly.

```hcl
module "project-factory" {
source = "terraform-google-modules/project-factory/google"
version = "~> 6.2.1"
...
}
```

### Permissions

In order to execute this module you must have a Service Account with the
Expand Down
35 changes: 20 additions & 15 deletions test/fixtures/minimal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,27 @@
* limitations under the License.
*/

provider "google" {
version = "~> 4.5"
terraform {
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.5"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.5"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}
random = {
source = "hashicorp/random"
version = "~> 2.2"
}
}
}

provider "google-beta" {
version = "~> 4.5"
}

provider "null" {
version = "~> 2.1"
}

provider "random" {
version = "~> 2.2"
}

module "project-factory" {
source = "../../../"

Expand Down
39 changes: 23 additions & 16 deletions test/fixtures/shared_vpc_no_subnets/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,29 @@
* limitations under the License.
*/

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

provider "google-beta" {
version = "~> 4.5"
terraform {
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.5"
}
google-beta = {
source = "hashicorp/google-beta"
version = "~> 4.5"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}
random = {
source = "hashicorp/random"
version = "~> 2.2"
}
gsuite = {
version = "~> 0.1.12"
}
}
}

provider "gsuite" {
Expand All @@ -29,16 +46,6 @@ provider "gsuite" {
"https://www.googleapis.com/auth/admin.directory.group",
"https://www.googleapis.com/auth/admin.directory.group.member",
]

version = "~> 0.1.12"
}

provider "null" {
version = "~> 2.1"
}

provider "random" {
version = "~> 2.2"
}

module "project-factory" {
Expand Down

0 comments on commit b66a080

Please sign in to comment.