{"id":21725424,"url":"https://github.com/jameswoolfenden/terraform-aws-kms","last_synced_at":"2026-04-09T21:06:46.326Z","repository":{"id":81359216,"uuid":"245812738","full_name":"JamesWoolfenden/terraform-aws-kms","owner":"JamesWoolfenden","description":"Get your KMS keys here","archived":false,"fork":false,"pushed_at":"2022-09-20T13:12:25.000Z","size":75,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T09:13:09.430Z","etag":null,"topics":["aws","building-block","kms","module","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JamesWoolfenden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-08T12:45:44.000Z","updated_at":"2022-09-20T13:08:17.000Z","dependencies_parsed_at":"2023-07-11T10:35:23.054Z","dependency_job_id":null,"html_url":"https://github.com/JamesWoolfenden/terraform-aws-kms","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/JamesWoolfenden/terraform-aws-kms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-aws-kms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-aws-kms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-aws-kms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-aws-kms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesWoolfenden","download_url":"https://codeload.github.com/JamesWoolfenden/terraform-aws-kms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-aws-kms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505358,"owners_count":23618929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","building-block","kms","module","terraform"],"created_at":"2024-11-26T03:17:34.535Z","updated_at":"2026-04-09T21:06:46.297Z","avatar_url":"https://github.com/JamesWoolfenden.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-kms\n\n[![Build Status](https://github.com/JamesWoolfenden/terraform-aws-kms/workflows/Verify%20and%20Bump/badge.svg?branch=master)](https://github.com/JamesWoolfenden/terraform-aws-kms)\n[![Latest Release](https://img.shields.io/github/release/JamesWoolfenden/terraform-aws-kms.svg)](https://github.com/JamesWoolfenden/terraform-aws-kms/releases/latest)\n[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/JamesWoolfenden/terraform-aws-kms.svg?label=latest)](https://github.com/JamesWoolfenden/terraform-aws-kms/releases/latest)\n![Terraform Version](https://img.shields.io/badge/tf-%3E%3D0.14.0-blue.svg)\n[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/JamesWoolfenden/terraform-aws-kms/cis_aws)](https://www.bridgecrew.cloud/link/badge?vcs=github\u0026fullRepo=JamesWoolfenden%2Fterraform-aws-kms\u0026benchmark=CIS+AWS+V1.2)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![checkov](https://img.shields.io/badge/checkov-verified-brightgreen)](https://www.checkov.io/)\n[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/jameswoolfenden/terraform-aws-kms/general)](https://www.bridgecrew.cloud/link/badge?vcs=github\u0026fullRepo=JamesWoolfenden%2Fterraform-aws-kms\u0026benchmark=INFRASTRUCTURE+SECURITY)\n\n---\n\nTerraform module - Create and optionally shares kms key to other accounts.\n\n---\n\nIt's 100% Open Source and licensed under the [APACHE2](LICENSE).\n\n![alt text](./diagram/kms.png)\n\n## Usage\n\nInclude this repository as a module in your existing Terraform code:\n\n```hcl\nmodule \"efs\" {\n  source      = \"JamesWoolfenden/kms/aws\"\n  version     = \"v0.0.11\"\n  common_tags = var.common_tags\n  key         = var.key\n  user_policy = data.aws_iam_policy_document.kms.json\n  alias       = var.alias\n}\n```\n\nThe example in the **examplea** folder shows how to pass your own policy in when creating your key.\n\nIf you want to share to other AWS accounts add values to a list called **accounts** to the module reference with the account ids, and set your own values to the map key.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\nNo requirements.\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | n/a |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_kms_alias.key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_alias) | resource |\n| [aws_kms_key.secure](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_alias\"\u003e\u003c/a\u003e [alias](#input\\_alias) | KMS alias | `string` | `\"alias/ami-sharing\"` | no |\n| \u003ca name=\"input_common_tags\"\u003e\u003c/a\u003e [common\\_tags](#input\\_common\\_tags) | This is to help you add tags to your cloud objects | `map(any)` | n/a | yes |\n| \u003ca name=\"input_is_enabled\"\u003e\u003c/a\u003e [is\\_enabled](#input\\_is\\_enabled) | n/a | `bool` | `true` | no |\n| \u003ca name=\"input_key\"\u003e\u003c/a\u003e [key](#input\\_key) | Details of the key | \u003cpre\u003eobject({\u003cbr\u003e    description              = string\u003cbr\u003e    deletion_window_in_days  = number\u003cbr\u003e    key_usage                = string\u003cbr\u003e    customer_master_key_spec = string\u003cbr\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr\u003e  \"customer_master_key_spec\": \"SYMMETRIC_DEFAULT\",\u003cbr\u003e  \"deletion_window_in_days\": 10,\u003cbr\u003e  \"description\": \"KMS key 1\",\u003cbr\u003e  \"key_usage\": \"ENCRYPT_DECRYPT\"\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_user_policy\"\u003e\u003c/a\u003e [user\\_policy](#input\\_user\\_policy) | Allow Key policies to be user supplied | `string` | `\"\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_alias\"\u003e\u003c/a\u003e [alias](#output\\_alias) | n/a |\n| \u003ca name=\"output_secure\"\u003e\u003c/a\u003e [secure](#output\\_secure) | n/a |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Policy\n\nThis is the policy required to build this project:\n\n\u003c!-- BEGINNING OF PRE-COMMIT-PIKE DOCS HOOK --\u003e\nThe Terraform resource required is:\n\n```golang\nresource \"aws_iam_policy\" \"terraform_pike\" {\n  name_prefix = \"terraform_pike\"\n  path        = \"/\"\n  description = \"Pike Autogenerated policy from IAC\"\n\n  policy = jsonencode({\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"kms:CreateAlias\",\n                \"kms:CreateKey\",\n                \"kms:DeleteAlias\",\n                \"kms:DescribeKey\",\n                \"kms:DisableKey\",\n                \"kms:EnableKey\",\n                \"kms:EnableKeyRotation\",\n                \"kms:GetKeyPolicy\",\n                \"kms:GetKeyRotationStatus\",\n                \"kms:ListAliases\",\n                \"kms:ListResourceTags\",\n                \"kms:PutKeyPolicy\",\n                \"kms:ScheduleKeyDeletion\",\n                \"kms:TagResource\",\n                \"kms:UntagResource\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n})\n}\n\n\n```\n\u003c!-- END OF PRE-COMMIT-PIKE DOCS HOOK --\u003e\n\n## Related Projects\n\nCheck out these related projects.\n\n- [terraform-aws-s3](https://github.com/jameswoolfenden/terraform-aws-s3) - S3 buckets\n\n## Help\n\n**Got a question?**\n\nFile a GitHub [issue](https://github.com/JamesWoolfenden/terraform-aws-kms/issues).\n\n## Contributing\n\n### Bug Reports \u0026 Feature Requests\n\nPlease use the [issue tracker](https://github.com/JamesWoolfenden/terraform-aws-kms/issues) to report any bugs or file feature requests.\n\n## Copyrights\n\nCopyright © 2019-2022 James Woolfenden\n\n## License\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nSee [LICENSE](LICENSE) for full details.\n\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\n\u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n\n### Contributors\n\n[![James Woolfenden][jameswoolfenden_avatar]][jameswoolfenden_homepage]\u003cbr/\u003e[James Woolfenden][jameswoolfenden_homepage]\n\n[jameswoolfenden_homepage]: https://github.com/jameswoolfenden\n[jameswoolfenden_avatar]: https://github.com/jameswoolfenden.png?size=150\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameswoolfenden%2Fterraform-aws-kms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameswoolfenden%2Fterraform-aws-kms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameswoolfenden%2Fterraform-aws-kms/lists"}