Giter Site home page Giter Site logo

terraform-google-kms-keyring's Introduction

Google KMS Keyring Terraform Module

Terraform Module for provisioning a GCP KMS Keyring. This module allows you to provision a GCP KMS Keyring and all of its underlying keys by specifiying an authoritative IAM policy for each crypto key resource.

Module Usage

module "keyring_example" {
  source  = "./terraform-google-kms-keyring"

  keyring_name     = "exapmle_ring"
  keyring_location = "us-west2"
  keys = [
    {
      key_name        = "test_key",
      purpose         = "ENCRYPT_DECRYPT",
      rotation_period = "2592000s",
      version_template = {
        algorithm        = "RSA_SIGN_PKCS1_3072_SHA256",
        protection_level = "SOFTWARE"
      },
      permissions = [
        {
          members = [
            "serviceAccount:<SERVICE ACCOUNT EMAIL>",
            "user:<USER EMAIL>",
            "group:<GROUP EMAIL>",
            "domain:<DOMAIN>"
          ],
          role    = <ROLE>,
          condition = {
            title       = <TITLE>,
            description = <DESCRIPTION>,
            expression  = <EXPRESSION>
          }
        }
      ]
    }
  ]

  providers = {
    google = google.<PROVIDER ALIAS>
  }
}

If desired, version_template can be set to null.

If you want to create a key with permissions that don't have any conditions, simply pass empty strings to the condition variable:

condition = {
  title       = "",
  description = "",
  expression  = ""
}

terraform-google-kms-keyring's People

Contributors

soggycactus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.