Code Monkey home page Code Monkey logo

tf-module.aws.kms's Introduction

Terraform AWS :: KMS Module

Description

Terraform AWS S3 Module for configuration of one or more KMS Customer managed encryption keys.

Example

Example Module found in ./example/default

Inputs

key type Description
default_tags map(any) (Optional) default Map of tags to apply to resources.
default_acm_admin_iam_arns list(string) (Optional) List of IAM roles/users who have full access to manage all keys.
default_acm_user_iam_arms list(string) (Optional) List of IAM roles/users who can decrypt / encrypt all keys.
default_acm_grant_iam_arns list(string) (Optional) List of IAM roles/users who can grant use of all keys.
keys map(object()) Define one or more kms key configurations (see variables.tf for full definition).

Usage :: Defined Variables


module "kms" {
  source = "[email protected]:dev-head/tf-module.aws.kms.git?ref=0.0.1"

  # Optionally provide default role arns as needed.
  default_acm_admin_iam_arns  = []
  default_acm_user_iam_arms   = []
  default_acm_grant_iam_arns  = []

  default_tags = {
    ManagedBy = "terraform"
  }
  
  keys = {
    example_s3_01 = {
      name              = "example-default-s3-v01"
      description       = "Key used for [default]::[S3]::[v01]::Encryption."
      tags              = {Environment = "TerraformTesting"}
      policy_statements = [
        {
          sid             = "AllowServiceAccess"
          effect          = "Allow"
          principals      = [{type = "Service", identifiers = ["s3.amazonaws.com"]}]
          actions         = ["kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey*"]
          resources       = ["arn:aws:s3:::example*"]
        }
      ]
    }
  }
}

Outputs

key type Description
apply_metadata string Output metadata regarding the apply.
key_attributes object Map of maps, indexed by they var.keys key, to ensure it's accessible.
key_resources object Provide full access to resource objects.

Example

key_attributes = {
  "example_s3_01" = {
    "alias_arn" = "arn:aws:kms:us-west-2:55555555555:alias/example-default-s3-v01"
    "arn"       = "arn:aws:kms:us-west-2:55555555555:key/55555555555-aaaaa-55555-bbbbb-555555555"
    "key_id"    = "55555555555-aaaaa-55555-bbbbb-555555555"
  }
}

tf-module.aws.kms's People

Contributors

dev-head avatar

Watchers

 avatar  avatar

Forkers

mullanaveen

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.