Skip to content

Commit e46c56c

Browse files
feat!: add Terraform 0.13 constraint and module attribution (#40)
1 parent 4d93ce3 commit e46c56c

File tree

6 files changed

+43
-31
lines changed

6 files changed

+43
-31
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ The resources/services/activations/deletions that this module will create/trigge
99
- Create IAM role bindings for owners, encrypters, decrypters
1010

1111
## Compatibility
12-
13-
This module is meant for use with Terraform 0.12. If you haven't upgraded and need a Terraform 0.11.x-compatible
14-
version of this module, the last released version intended for Terraform 0.11.x
15-
is [v0.1.0](https://registry.terraform.io/modules/terraform-google-modules/kms/google/0.1.0).
12+
This module is meant for use with Terraform 0.13. If you haven't
13+
[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform
14+
0.12.x-compatible version of this module, the last released version
15+
intended for Terraform 0.12.x is [v1.2.0](https://registry.terraform.io/modules/terraform-google-modules/-kms/google/v1.2.0).
1616

1717
## Usage
1818

@@ -42,22 +42,22 @@ Functional examples are included in the
4242
## Inputs
4343

4444
| Name | Description | Type | Default | Required |
45-
|------|-------------|:----:|:-----:|:-----:|
46-
| decrypters | List of comma-separated owners for each key declared in set_decrypters_for. | list(string) | `<list>` | no |
47-
| encrypters | List of comma-separated owners for each key declared in set_encrypters_for. | list(string) | `<list>` | no |
48-
| key\_algorithm | The algorithm to use when creating a version based on this template. See the https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm for possible inputs. | string | `"GOOGLE_SYMMETRIC_ENCRYPTION"` | no |
49-
| key\_protection\_level | The protection level to use when creating a version based on this template. Default value: "SOFTWARE" Possible values: ["SOFTWARE", "HSM"] | string | `"SOFTWARE"` | no |
50-
| key\_rotation\_period | | string | `"100000s"` | no |
51-
| keyring | Keyring name. | string | n/a | yes |
52-
| keys | Key names. | list(string) | `<list>` | no |
53-
| labels | Labels, provided as a map | map(string) | `<map>` | no |
54-
| location | Location for the keyring. | string | n/a | yes |
55-
| owners | List of comma-separated owners for each key declared in set_owners_for. | list(string) | `<list>` | no |
56-
| prevent\_destroy | Set the prevent_destroy lifecycle attribute on keys. | string | `"true"` | no |
57-
| project\_id | Project id where the keyring will be created. | string | n/a | yes |
58-
| set\_decrypters\_for | Name of keys for which decrypters will be set. | list(string) | `<list>` | no |
59-
| set\_encrypters\_for | Name of keys for which encrypters will be set. | list(string) | `<list>` | no |
60-
| set\_owners\_for | Name of keys for which owners will be set. | list(string) | `<list>` | no |
45+
|------|-------------|------|---------|:--------:|
46+
| decrypters | List of comma-separated owners for each key declared in set\_decrypters\_for. | `list(string)` | `[]` | no |
47+
| encrypters | List of comma-separated owners for each key declared in set\_encrypters\_for. | `list(string)` | `[]` | no |
48+
| key\_algorithm | The algorithm to use when creating a version based on this template. See the https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm for possible inputs. | `string` | `"GOOGLE_SYMMETRIC_ENCRYPTION"` | no |
49+
| key\_protection\_level | The protection level to use when creating a version based on this template. Default value: "SOFTWARE" Possible values: ["SOFTWARE", "HSM"] | `string` | `"SOFTWARE"` | no |
50+
| key\_rotation\_period | n/a | `string` | `"100000s"` | no |
51+
| keyring | Keyring name. | `string` | n/a | yes |
52+
| keys | Key names. | `list(string)` | `[]` | no |
53+
| labels | Labels, provided as a map | `map(string)` | `{}` | no |
54+
| location | Location for the keyring. | `string` | n/a | yes |
55+
| owners | List of comma-separated owners for each key declared in set\_owners\_for. | `list(string)` | `[]` | no |
56+
| prevent\_destroy | Set the prevent\_destroy lifecycle attribute on keys. | `bool` | `true` | no |
57+
| project\_id | Project id where the keyring will be created. | `string` | n/a | yes |
58+
| set\_decrypters\_for | Name of keys for which decrypters will be set. | `list(string)` | `[]` | no |
59+
| set\_encrypters\_for | Name of keys for which encrypters will be set. | `list(string)` | `[]` | no |
60+
| set\_owners\_for | Name of keys for which owners will be set. | `list(string)` | `[]` | no |
6161

6262
## Outputs
6363

@@ -78,7 +78,7 @@ These sections describe requirements for using this module.
7878

7979
The following dependencies must be available:
8080

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

8484
### Service Account

examples/simple_example/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ This example illustrates how to use the `kms` module.
66
## Inputs
77

88
| Name | Description | Type | Default | Required |
9-
|------|-------------|:----:|:-----:|:-----:|
10-
| keyring | Keyring name. | string | n/a | yes |
11-
| keys | Key names. | list(string) | `<list>` | no |
12-
| location | Location for the keyring. | string | `"global"` | no |
13-
| project\_id | The ID of the project in which to provision resources. | string | n/a | yes |
9+
|------|-------------|------|---------|:--------:|
10+
| keyring | Keyring name. | `string` | n/a | yes |
11+
| keys | Key names. | `list(string)` | `[]` | no |
12+
| location | Location for the keyring. | `string` | `"global"` | no |
13+
| project\_id | The ID of the project in which to provision resources. | `string` | n/a | yes |
1414

1515
## Outputs
1616

examples/simple_example/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
provider "google" {
18-
version = "~> 3.0.0"
18+
version = "~> 3.53"
1919
}
2020

2121
module "kms" {

test/setup/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ provider "google" {
2121

2222
module "project_ci_kms" {
2323
source = "terraform-google-modules/project-factory/google"
24-
version = "~> 8.0"
24+
version = "~> 10.0"
2525

2626
name = "ci-kms-module"
2727
random_project_id = "true"

versions.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2021 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,5 +15,17 @@
1515
*/
1616

1717
terraform {
18-
required_version = ">= 0.12"
18+
required_version = ">= 0.13"
19+
required_providers {
20+
21+
google = {
22+
source = "hashicorp/google"
23+
version = "~> 3.53"
24+
}
25+
}
26+
27+
provider_meta "google" {
28+
module_name = "blueprints/terraform/terraform-google-kms/v1.0.0"
29+
}
30+
1931
}

0 commit comments

Comments
 (0)