Skip to content

Commit

Permalink
feat!: Restrict to Terraform 0.13+ and add module attribution (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-foundation-bot authored Mar 15, 2021
1 parent 152f063 commit c423601
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ The resources/services/activations/deletions that this module will create/trigge
- one optional service account key per service account

## Compatibility

This module is meant for use with Terraform 0.12. If you haven't [upgraded](https://www.terraform.io/upgrade-guides/0-12.html)
and need a Terraform 0.11.x-compatible version of this module, the last released version intended for
Terraform 0.11.x is [0.1.1](https://registry.terraform.io/modules/terraform-google-modules/service-accounts/google/0.1.1).
This module is meant for use with Terraform 0.13. If you haven't
[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform
0.12.x-compatible version of this module, the last released version
intended for Terraform 0.12.x is [v3.0.1](https://registry.terraform.io/modules/terraform-google-modules/-service-accounts/google/v3.0.1).

## Usage

Expand Down Expand Up @@ -80,7 +80,7 @@ These sections describe requirements for using this module.

The following dependencies must be available:

- [Terraform][terraform] v0.12
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.0
- [Terraform Provider for GCP][terraform-provider-gcp] plugin >= v2.0

### IAM
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_service_accounts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

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

module "service_accounts" {
Expand Down
2 changes: 1 addition & 1 deletion examples/single_service_account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

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

module "service_accounts" {
Expand Down
17 changes: 15 additions & 2 deletions modules/key-distributor/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2020 Google LLC
* 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.
Expand All @@ -13,6 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

terraform {
required_version = ">= 0.12.6"
required_version = ">= 0.13"
required_providers {

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

provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-service-accounts:key-distributor/v1.0.0"
}

}
2 changes: 1 addition & 1 deletion test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module "project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 9.2"
version = "~> 10.0"

name = "ci-service-accounts"
random_project_id = "true"
Expand Down
16 changes: 14 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019 Google LLC
* 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.
Expand All @@ -15,5 +15,17 @@
*/

terraform {
required_version = ">= 0.12.6"
required_version = ">= 0.13"
required_providers {

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

provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-service-accounts/v1.0.0"
}

}

0 comments on commit c423601

Please sign in to comment.