All Projects → terraform-google-modules → terraform-google-kms

terraform-google-modules / terraform-google-kms

Licence: Apache-2.0 license
Simple Cloud KMS module that allows managing a keyring, zero or more keys in the keyring, and IAM role bindings on individual keys.

Programming Languages

HCL
1544 projects
Makefile
30231 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to terraform-google-kms

terraform-google-folders
This module helps create several folders under the same parent
Stars: ✭ 23 (-17.86%)
Mutual labels:  cft-terraform, cft-fabric
terraform-google-startup-scripts
A library of useful startup scripts to embed in VMs created by Terraform
Stars: ✭ 50 (+78.57%)
Mutual labels:  cft-terraform
terraform-google-dataflow
This module handles opiniated Dataflow job configuration and deployments.
Stars: ✭ 19 (-32.14%)
Mutual labels:  cft-terraform
terraform-google-slo
Creates SLOs on Google Cloud from custom Stackdriver metrics capability to export SLOs to Google Cloud services and other systems
Stars: ✭ 59 (+110.71%)
Mutual labels:  cft-terraform
terraform-google-group
Manages Google Groups
Stars: ✭ 28 (+0%)
Mutual labels:  cft-terraform
terraform-google-cloud-storage
Creates one or more Cloud Storage buckets and assigns basic permissions on them to arbitrary users
Stars: ✭ 116 (+314.29%)
Mutual labels:  cft-terraform
terraform-google-bootstrap
Bootstraps Terraform usage and related CI/CD in a new Google Cloud organization
Stars: ✭ 152 (+442.86%)
Mutual labels:  cft-terraform
terraform-google-vpc-service-controls
Handles opinionated VPC Service Controls and Access Context Manager configuration and deployments
Stars: ✭ 48 (+71.43%)
Mutual labels:  cft-terraform
terraform-google-scheduled-function
Sets up a scheduled job to trigger events and run functions
Stars: ✭ 55 (+96.43%)
Mutual labels:  cft-terraform
terraform-google-memorystore
A Terraform module for creating a fully functional Google Memorystore (redis) instance.
Stars: ✭ 16 (-42.86%)
Mutual labels:  cft-terraform
terraform-google-cloud-operations
This module is a collection of submodules related to Google Cloud Operations (Logging and Monitoring).
Stars: ✭ 18 (-35.71%)
Mutual labels:  cft-terraform
terraform-google-vm
This is a collection of opinionated submodules that can be used to provision VMs in GCP.
Stars: ✭ 137 (+389.29%)
Mutual labels:  cft-terraform
terraform-google-lb-internal
Modular Internal Load Balancer for GCE using forwarding rules.
Stars: ✭ 59 (+110.71%)
Mutual labels:  cft-terraform
terraform-google-bastion-host
This module will generate a bastion host vm compatible with OS Login and IAP Tunneling that can be used to access internal VMs.
Stars: ✭ 78 (+178.57%)
Mutual labels:  cft-terraform
terraform-google-cloud-dns
This module makes it easy to create and manage Google Cloud DNS public or private zones, and their records.
Stars: ✭ 22 (-21.43%)
Mutual labels:  cft-fabric

Google KMS Terraform Module

Simple Cloud KMS module that allows managing a keyring, zero or more keys in the keyring, and IAM role bindings on individual keys.

The resources/services/activations/deletions that this module will create/trigger are:

  • Create a KMS keyring in the provided project
  • Create zero or more keys in the keyring
  • Create IAM role bindings for owners, encrypters, decrypters

Compatibility

This module is meant for use with Terraform 0.13+ and tested using Terraform 1.0+. If you find incompatibilities using Terraform >=0.13, please open an issue. If you haven't upgraded and need a Terraform 0.12.x-compatible version of this module, the last released version intended for Terraform 0.12.x is v1.2.0.

Usage

Basic usage of this module is as follows:

module "kms" {
  source  = "terraform-google-modules/kms/google"
  version = "~> 1.2"

  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]",
  ]
}

Functional examples are included in the examples directory.

Inputs

Name Description Type Default Required
decrypters List of comma-separated owners for each key declared in set_decrypters_for. list(string) [] no
encrypters List of comma-separated owners for each key declared in set_encrypters_for. list(string) [] 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 n/a string "100000s" no
keyring Keyring name. string n/a yes
keys Key names. list(string) [] no
labels Labels, provided as a map map(string) {} 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) [] no
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
purpose The immutable purpose of the CryptoKey. Possible values are ENCRYPT_DECRYPT, ASYMMETRIC_SIGN, and ASYMMETRIC_DECRYPT. string "ENCRYPT_DECRYPT" no
set_decrypters_for Name of keys for which decrypters will be set. list(string) [] no
set_encrypters_for Name of keys for which encrypters will be set. list(string) [] no
set_owners_for Name of keys for which owners will be set. list(string) [] no

Outputs

Name Description
keyring Self link of the keyring.
keyring_name Name of the keyring.
keyring_resource Keyring resource.
keys Map of key name => key self link.

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Service Account

A service account with one of the following roles must be used to provision the resources of this module:

  • Cloud KMS Admin: roles/cloudkms.admin or
  • Owner: roles/owner

The Project Factory module and the IAM module may be used in combination to provision a service account with the necessary roles applied.

APIs

A project with the following APIs enabled must be used to host the resources of this module:

  • Google Cloud Key Management Service: cloudkms.googleapis.com

The Project Factory module can be used to provision a project with the necessary APIs enabled.

Contributing

Refer to the contribution guidelines for information on contributing to this module.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].