Git Product home page Git Product logo

terraform-aws-kms-key's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

terraform
main.tf
versions.tf
  • aws >= 3.64.0
  • hashicorp/terraform >= 0.13

  • Check this box to trigger a request for Renovate to run again on this repository

Enable key replication across regions when 'multi_region' option is selected

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

A clear and concise description of what the bug is.

Expected Behavior

Enable key replication across regions when 'multi_region' option is selected

Use Case

KMS supports key replication. It is logical to support it from this module as it already support creation of multi-region key.

Describe Ideal Solution

This module should use below Terraform recourse and create replication https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_replica_key

Alternatives Considered

If i have to use 'multi-region' now i have to implement on top myself using https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_replica_key

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Add Example Usage

what

  • Add example invocation

why

  • We need this so we can soon enable automated continuous integration testing of module

Running with Complete Example results in Error

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

I started with this - https://github.com/cloudposse/terraform-aws-kms-key/tree/0.12.1/examples/complete

Expected Behavior

I expected the KMS Key to be generated

Steps to Reproduce

Steps to reproduce the behavior:

  1. Download - https://github.com/cloudposse/terraform-aws-kms-key/tree/0.12.1/examples/complete
  2. Terraform init
  3. Terraform plan
  4. See error

Admin:~/environment/ModuleTemplate/LearnModules/modules/kms-key (aws-s3-bucket2) $ terraform plan
var.region
Enter a value: us-east-1


│ Error: "name" must begin with 'alias/' and be comprised of only [a-zA-Z0-9/_-]

│ with module.kms_key.aws_kms_alias.default[0],
│ on .terraform/modules/kms_key/main.tf line 15, in resource "aws_kms_alias" "default":
│ 15: name = coalesce(var.alias, format("alias/%v", module.this.id))

When I hard coded the value on line 15 to be alias/123 it Worked!

Also running the simplified example works as well....

Screenshots

If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: AWS Linux ec2 box
  • Version [e.g. 10.15]

Additional Context

Add any other context about the problem here.

Provide canned policies

This module currently creates KMS keys with a policy stating "any IAM user/role can do anything with this key".

If you want a more restrictive policy, you have to write it yourself.

I think it would be valuable for the module to offer some canned policies that can be used instead.

This is a proposal for giving module users more flexible tools for controlling the key policy.

If you like the design, we can discuss the details, and I am interested in implementing it.

Expected Behavior

var.policy takes precedence over the below. If it is set, the other proposed variables are ignored.

var.canned_policy has a few options, like:

  • aws-service-use (the key can only be attached to AWS resources, like RDS encryption)

var.extra_policy_statements lets you provide IAM Policy statements that will be appended to the policy. (It works with the default policy, and with all canned policies). For example:

extra_policy_statements = [
    {
        Sid = "Allow encryption by userupload app"
        Principal = {
            AWS = "arn:aws:iam...:role/userupload"
        }
        Action = "kms:Encrypt"
        Resource = "*"
    },
    {
        Sid = "Allow decryption by userdownload app"
        Principal = {
            AWS = "arn:aws:iam...:role/userdownload"
        }
        Action = "kms:Decrypt"
        Resource = "*"
    },
]

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.