Giter Site home page Giter Site logo

terraform-ibm-modules / terraform-ibm-kms-key Goto Github PK

View Code? Open in Web Editor NEW
1.0 17.0 2.0 762 KB

Module for creation of KMS keys

License: Apache License 2.0

HCL 62.19% Go 37.81%
core-team ibm-cloud key-protect kms terraform terraform-module hpcs graduated supported

terraform-ibm-kms-key's Introduction

KMS key module

Graduated (Supported) semantic-release pre-commit latest release Renovate enabled

This module supports creating a standard or root key in an existing key ring and KMS instance. KMS can be Key Protect or Hyper Protect Crypto Services (HPCS) Standard plan instance. You can specify rotation and deletion policies for the keys.

Overview

terraform-ibm-kms-key

Usage

provider "ibm" {
  ibmcloud_api_key = "XXXXXXXXXX"
  # Must be the same region the KMS instance is in
  region           = "us-south"
}

# KMS root key
module "kms_root_key" {
  source          = "terraform-ibm-modules/kms-key/ibm"
  version         = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
  kms_instance_id = "XXxxXXxx-xxxx-XXXX-xxxx-XXxxXXxx"
  key_name        = "my-root-key"
}

# KMS standard key
module "kms_standard_key" {
  source          = "terraform-ibm-modules/kms-key/ibm"
  version         = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
  kms_instance_id = "XXxxXXxx-xxxx-XXXX-xxxx-XXxxXXxx"
  key_name        = "my-standard-key"
  standard_key    = true
}

Required IAM access policies

You need the following permissions to run this module.

  • Account Management
    • Resource Group service
      • Viewer platform access
  • IAM Services
    • KMS service
      • Viewer platform access
      • Manager service access

Requirements

Name Version
terraform >= 1.0.0
ibm >= 1.49.0, < 2.0.0

Modules

No modules.

Resources

Name Type
ibm_kms_key.key resource
ibm_kms_key_policies.root_key_policy resource
ibm_kms_key_policies.standard_key_policy resource

Inputs

Name Description Type Default Required
dual_auth_delete_enabled If set to true, KMS enables a dual authorization policy on a single key. Note: Once the dual authorization policy is set on the key, it cannot be reverted. A key with dual authorization policy enabled cannot be destroyed by using Terraform. bool false no
endpoint_type Endpoint to use when creating the Key string "public" no
force_delete Set as true to enable forcing deletion even if key is in use bool false no
key_name Name to give the key string n/a yes
kms_instance_id ID or GUID of KMS Instance string n/a yes
kms_key_ring_id The ID of the key ring where you want to add your KMS key string "default" no
rotation_interval_month The key rotation time interval in months. Rotation policy cannot be set for standard key, so value is ignored if var.standard_key is true number 1 no
standard_key Set as true for Standard Key, false for Root Key bool false no

Outputs

Name Description
crn Key CRN
dual_auth_delete Is Dual Auth Delete Enabled
key_id Key ID
rotation_interval_month Month Interval for Rotation

Contributing

You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.

To set up your local development environment, see Local development setup in the project documentation.

terraform-ibm-kms-key's People

Contributors

aashiq-j avatar akocbek avatar daniel-butler-irl avatar hancockp-at-ibm avatar iamar7 avatar jojustin avatar jor2 avatar khuzaima05 avatar maheshwarishikha avatar marifse avatar mounika-nalla avatar ocofaigh avatar rajatagarwal-ibm avatar sirspidey avatar terraform-ibm-modules-ops avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.