forked from dysnix/terraform-google-kms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from p2p-org/non-authoritative
Non-authoritative members mode
- Loading branch information
Showing
23 changed files
with
352 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# 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. | ||
|
||
releaseType: terraform-module | ||
handleGHRelease: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ terraform.tfstate* | |
*.pyc | ||
.kitchen | ||
credentials.json | ||
|
||
# tf lock file | ||
.terraform.lock.hcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,28 +9,36 @@ The resources/services/activations/deletions that this module will create/trigge | |
- Create IAM role bindings for owners, encrypters, decrypters | ||
|
||
## Compatibility | ||
|
||
This module is meant for use with Terraform 0.12. If you haven't upgraded and need a Terraform 0.11.x-compatible | ||
version of this module, the last released version intended for Terraform 0.11.x | ||
is [v0.1.0](https://registry.terraform.io/modules/terraform-google-modules/kms/google/0.1.0). | ||
This module is meant for use with Terraform 1.0+. | ||
|
||
## Usage | ||
|
||
Basic usage of this module is as follows: | ||
|
||
```hcl | ||
module "kms" { | ||
source = "terraform-google-modules/kms/google" | ||
version = "~> 1.2" | ||
source = "github.com/p2p-org/terraform-google-kms?ref=v2.0.0" | ||
project_id = "<PROJECT ID>" | ||
location = "europe" | ||
keyring = "sample-keyring" | ||
keys = ["foo", "spam"] | ||
set_owners_for = ["foo", "spam"] | ||
owners = [ | ||
"group:[email protected],group:[email protected]", | ||
"group:[email protected]", | ||
key_opts = [ | ||
{ | ||
key = "foo" | ||
rotation_period = "100000s" | ||
}, | ||
] | ||
owners = ["group:[email protected]","user:[email protected]"] | ||
## additional ACLs | ||
acl = [ | ||
{ | ||
key = "spam" | ||
decrypters = ["serviceAccount:[email protected]"] | ||
} | ||
] | ||
} | ||
``` | ||
|
@@ -42,45 +50,37 @@ Functional examples are included in the | |
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| decrypters | List of comma-separated owners for each key declared in set_decrypters_for. | list(string) | `<list>` | no | | ||
| encrypters | List of comma-separated owners for each key declared in set_encrypters_for. | list(string) | `<list>` | no | | ||
| 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 | | ||
| 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 | | ||
| key\_rotation\_period | | string | `"100000s"` | no | | ||
| keyring | Keyring name. | string | n/a | yes | | ||
| keys | Key names. | list(string) | `<list>` | no | | ||
| labels | Labels, provided as a map | map(string) | `<map>` | no | | ||
| location | Location for the keyring. | string | n/a | yes | | ||
| owners | List of comma-separated owners for each key declared in set_owners_for. | list(string) | `<list>` | no | | ||
| prevent\_destroy | Set the prevent_destroy lifecycle attribute on keys. | string | `"true"` | no | | ||
| project\_id | Project id where the keyring will be created. | string | n/a | yes | | ||
| set\_decrypters\_for | Name of keys for which decrypters will be set. | list(string) | `<list>` | no | | ||
| set\_encrypters\_for | Name of keys for which encrypters will be set. | list(string) | `<list>` | no | | ||
| set\_owners\_for | Name of keys for which owners will be set. | list(string) | `<list>` | no | | ||
|------|-------------|------|---------|:--------:| | ||
| owners | Owners shared for all the managed keys. | `list(string)` | `[]` | | no | | ||
| encrypters | Encrypters shared for all the managed keys. | `list(string)` | `[]` | | no | | ||
| decrypters | Decrypters shared for all the managed keys. | `list(string)` | `[]` | | no | | ||
| acl | Additional ACL for for the managed keys. | `list(any)` | `[]` | no | | ||
| existing\_keyring | Use existing keyring | `bool` | `false` | no | | ||
| key\_opts | Specifies key specific options. | `list(any)` | `[]` | no | | ||
| keyring | Keyring name. | `string` | n/a | yes | | ||
| keys | Key names. | `list(string)` | `[]` | no | | ||
| location | Location for the keyring. | `string` | n/a | yes | | ||
| prevent\_destroy | Set the prevent\_destroy lifecycle attribute on keys. | `bool` | `true` | no | | ||
| project\_id | Project id where the keyring will be created. | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| keyring | Self link of the keyring. | | ||
| existing\_keyring | Existing keyring is used, i.e. keyring has been created. | | ||
| keyring\_id | Self link of the keyring. | | ||
| keyring\_name | Name of the keyring. | | ||
| keyring\_resource | Keyring resource. | | ||
| keys | Map of key name => key self link. | | ||
| keyring\_project | Project of the keyring. | | ||
| keys | Map of key name => id. | | ||
| kms\_keys | Managed kms keys details. | | ||
| location | Location of the keyring. | | ||
|
||
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> | ||
|
||
## Requirements | ||
|
||
These sections describe requirements for using this module. | ||
|
||
### Software | ||
|
||
The following dependencies must be available: | ||
|
||
- [Terraform][terraform] v0.12 | ||
- [Terraform Provider for GCP][terraform-provider-gcp] plugin v3.0 | ||
|
||
### Service Account | ||
|
||
A service account with one of the following roles must be used to provision | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* 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" | ||
} | ||
} | ||
required_version = ">= 0.13" | ||
} |
Oops, something went wrong.