{"id":19427746,"url":"https://github.com/zeroae/terraform-shell-rsa-encrypt","last_synced_at":"2025-02-25T05:22:18.777Z","repository":{"id":40990116,"uuid":"326306763","full_name":"zeroae/terraform-shell-rsa-encrypt","owner":"zeroae","description":"A Terraform module for encrypting content using an RSA public key","archived":false,"fork":false,"pushed_at":"2021-11-23T01:49:48.000Z","size":61,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-10T14:13:01.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zeroae.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}},"created_at":"2021-01-03T01:47:08.000Z","updated_at":"2023-05-23T00:11:22.000Z","dependencies_parsed_at":"2022-09-15T14:22:19.704Z","dependency_job_id":null,"html_url":"https://github.com/zeroae/terraform-shell-rsa-encrypt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"cloudposse/terraform-example-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroae%2Fterraform-shell-rsa-encrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroae%2Fterraform-shell-rsa-encrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroae%2Fterraform-shell-rsa-encrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroae%2Fterraform-shell-rsa-encrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroae","download_url":"https://codeload.github.com/zeroae/terraform-shell-rsa-encrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232927940,"owners_count":18598088,"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":[],"created_at":"2024-11-10T14:12:45.899Z","updated_at":"2025-01-07T19:44:11.965Z","avatar_url":"https://github.com/zeroae.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable --\u003e\n# terraform-rsa-encrypt [![Latest Release](https://img.shields.io/github/release/zeroae/terraform-shell-rsa-encrypt.svg)](https://github.com/zeroae/terraform-shell-rsa-encrypt/releases/latest)\n\u003c!-- markdownlint-restore --\u003e\n\n[![README Header][readme_header_img]][readme_header_link]\n\n[![Cloud Posse][logo]](https://cpco.io/homepage)\n\n\u003c!--\n\n\n\n\n  ** DO NOT EDIT THIS FILE\n  **\n  ** This file was automatically generated by the `build-harness`.\n  ** 1) Make all changes to `README.yaml`\n  ** 2) Run `make init` (you only need to do this once)\n  ** 3) Run`make readme` to rebuild this file.\n  **\n  ** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)\n  **\n\n\n\n\n\n--\u003e\n\nThe `terraform-shell-rsa-encrypt` module can be used for encrypting content using an RSA public key.\nIt is the missing part of the built-in \"rsadecrypt\".\n\n\n---\n\nThis project is part of our comprehensive [\"SweetOps\"](https://cpco.io/sweetops) approach towards DevOps.\n[\u003cimg align=\"right\" title=\"Share via Email\" src=\"https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg\"/\u003e][share_email]\n[\u003cimg align=\"right\" title=\"Share on Google+\" src=\"https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg\" /\u003e][share_googleplus]\n[\u003cimg align=\"right\" title=\"Share on Facebook\" src=\"https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg\" /\u003e][share_facebook]\n[\u003cimg align=\"right\" title=\"Share on Reddit\" src=\"https://docs.cloudposse.com/images/ionicons/social-reddit-outline-2.0.1-16x16-999999.svg\" /\u003e][share_reddit]\n[\u003cimg align=\"right\" title=\"Share on LinkedIn\" src=\"https://docs.cloudposse.com/images/ionicons/social-linkedin-outline-2.0.1-16x16-999999.svg\" /\u003e][share_linkedin]\n[\u003cimg align=\"right\" title=\"Share on Twitter\" src=\"https://docs.cloudposse.com/images/ionicons/social-twitter-outline-2.0.1-16x16-999999.svg\" /\u003e][share_twitter]\n\n\n[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]\n\n\n\nIt's 100% Open Source and licensed under the [APACHE2](LICENSE).\n\n\n\n\n\n\n\nWe literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!\n\n\n\n\n\n\n\n## Usage\n\n\n**IMPORTANT:** We do not pin modules to versions in our examples because of the\ndifficulty of keeping the versions in the documentation in sync with the latest released versions.\nWe highly recommend that in your code you pin the version to the exact version you are\nusing so that your infrastructure remains stable, and update versions in a\nsystematic way so that they do not catch you by surprise.\n\nAlso, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)),\nthe registry shows many of our inputs as required when in fact they are optional.\nThe table below correctly indicates which inputs are required.\n\n\nHere's how to invoke this example module in your projects\n\n```hcl\nmodule \"encrypt\" {\n  source = \"zeroae/rsa-encrypt/shell\"\n\n  public_key_pem = file(\"path/to/public-key.pem\")\n  content_base64 = filebase64(\"path/to/sensitive.txt\")\n}\n```\n\n\n\n\n## Examples\n\nHere is an example of using this module:\n- [`examples/complete`](https://github.com/zeroae/terraform-shell-rsa-encrypt/) - complete example of using this module\n\n\n\n\u003c!-- markdownlint-disable --\u003e\n## Makefile Targets\n```text\nAvailable targets:\n\n  help                                Help screen\n  help/all                            Display help for all targets\n  help/short                          This help short screen\n  lint                                Lint terraform code\n\n```\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- markdownlint-disable --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 0.12.0, \u003c 0.14.0 |\n| local | ~\u003e 1.2 |\n| random | ~\u003e 2.2 |\n\n## Providers\n\nNo provider.\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| algorithm | The algorithm to use, RSA or SMIME. | `string` | `\"RSA\"` | no |\n| cert\\_pem | The (self-)signed certificate if using SMIME. | `string` | `null` | no |\n| content\\_base64 | Base64-encoded data to be encrypted. | `string` | n/a | yes |\n| public\\_key\\_pem | The RSA public key to use for encryption. | `string` | `null` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| result | The base64-encoded encrypted content. |\n\n\u003c!-- markdownlint-restore --\u003e\n\n\n\n## Share the Love\n\nLike this project? Please give it a ★ on [our GitHub](https://github.com/zeroae/terraform-rsa-encrypt)! (it helps us **a lot**)\n\nAre you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)\n\n\n## Related Projects\n\nCheck out these related projects.\n\n- [terraform-resource-shell](https://github.com/matti/terraform-shell-resource) - Run (exec) a command in shell and capture the output (stdout, stderr) and status code (exit status)\n\n\n\n\n## References\n\nFor additional context, refer to some of these links.\n\n- [Terraform rsaencrypt hashicorp/terraform#16647](https://github.com/hashicorp/terraform/pull/16647) - Terraform did not include the rsaencrypt function when rsadecrypt was merged\n- [Terraform Standard Module Structure](https://www.terraform.io/docs/modules/index.html#standard-module-structure) - HashiCorp's standard module structure is a file and directory layout we recommend for reusable modules distributed in separate repositories.\n- [Terraform Module Requirements](https://www.terraform.io/docs/registry/modules/publish.html#requirements) - HashiCorp's guidance on all the requirements for publishing a module. Meeting the requirements for publishing a module is extremely easy.\n\n\n## Help\n\n**Got a question?** We got answers.\n\nFile a GitHub [issue](https://github.com/zeroae/terraform-rsa-encrypt/issues), send us an [email][email] or join our [Slack Community][slack].\n\n[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]\n\n## DevOps Accelerator for Startups\n\n\nWe are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.\n\n[![Learn More](https://img.shields.io/badge/learn%20more-success.svg?style=for-the-badge)][commercial_support]\n\nWork directly with our team of DevOps experts via email, slack, and video conferencing.\n\nWe deliver 10x the value for a fraction of the cost of a full-time engineer. Our track record is not even funny. If you want things done right and you need it done FAST, then we're your best bet.\n\n- **Reference Architecture.** You'll get everything you need from the ground up built using 100% infrastructure as code.\n- **Release Engineering.** You'll have end-to-end CI/CD with unlimited staging environments.\n- **Site Reliability Engineering.** You'll have total visibility into your apps and microservices.\n- **Security Baseline.** You'll have built-in governance with accountability and audit logs for all changes.\n- **GitOps.** You'll be able to operate your infrastructure via Pull Requests.\n- **Training.** You'll receive hands-on training so your team can operate what we build.\n- **Questions.** You'll have a direct line of communication between our teams via a Shared Slack channel.\n- **Troubleshooting.** You'll get help to triage when things aren't working.\n- **Code Reviews.** You'll receive constructive feedback on Pull Requests.\n- **Bug Fixes.** We'll rapidly work with you to fix any bugs in our projects.\n\n## Slack Community\n\nJoin our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our \"SweetOps\" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.\n\n## Discourse Forums\n\nParticipate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.\n\n## Newsletter\n\nSign up for [our newsletter][newsletter] that covers everything on our technology radar.  Receive updates on what we're up to on GitHub as well as awesome new projects we discover.\n\n## Office Hours\n\n[Join us every Wednesday via Zoom][office_hours] for our weekly \"Lunch \u0026 Learn\" sessions. It's **FREE** for everyone!\n\n[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png\")][office_hours]\n\n## Contributing\n\n### Bug Reports \u0026 Feature Requests\n\nPlease use the [issue tracker](https://github.com/zeroae/terraform-rsa-encrypt/issues) to report any bugs or file feature requests.\n\n### Developing\n\nIf you are interested in being a contributor and want to get involved in developing this project or [help out](https://cpco.io/help-out) with our other projects, we would love to hear from you! Shoot us an [email][email].\n\nIn general, PRs are welcome. We follow the typical \"fork-and-pull\" Git workflow.\n\n 1. **Fork** the repo on GitHub\n 2. **Clone** the project to your own machine\n 3. **Commit** changes to your own branch\n 4. **Push** your work back up to your fork\n 5. Submit a **Pull Request** so that we can review your changes\n\n**NOTE:** Be sure to merge the latest changes from \"upstream\" before making a pull request!\n\n\n\n## Copyrights\n\nCopyright © 2020-2021 [Zero A.E., LLC](https://zero-ae.com)\n\n\n\n\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\n```text\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  https://www.apache.org/licenses/LICENSE-2.0\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\n\n\n\n\n\n\n\n\n## Trademarks\n\nAll other trademarks referenced herein are the property of their respective owners.\n\n## About\n\nThis project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know by [leaving a testimonial][testimonial]!\n\n[![Cloud Posse][logo]][website]\n\nWe're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️  [Open Source Software][we_love_open_source].\n\nWe offer [paid support][commercial_support] on all of our projects.\n\nCheck out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.\n\n\n\n### Contributors\n\n\u003c!-- markdownlint-disable --\u003e\n|  [![Patrick Sodré][sodre_avatar]][sodre_homepage]\u003cbr/\u003e[Patrick Sodré][sodre_homepage] |\n|---|\n\u003c!-- markdownlint-restore --\u003e\n\n  [sodre_homepage]: https://github.com/sodre\n  [sodre_avatar]: https://img.cloudposse.com/150x150/https://github.com/sodre.png\n\n[![README Footer][readme_footer_img]][readme_footer_link]\n[![Beacon][beacon]][website]\n\n  [logo]: https://cloudposse.com/logo-300x69.svg\n  [docs]: https://cpco.io/docs?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=docs\n  [website]: https://cpco.io/homepage?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=website\n  [github]: https://cpco.io/github?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=github\n  [jobs]: https://cpco.io/jobs?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=jobs\n  [hire]: https://cpco.io/hire?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=hire\n  [slack]: https://cpco.io/slack?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=slack\n  [linkedin]: https://cpco.io/linkedin?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=linkedin\n  [twitter]: https://cpco.io/twitter?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=twitter\n  [testimonial]: https://cpco.io/leave-testimonial?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=testimonial\n  [office_hours]: https://cloudposse.com/office-hours?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=office_hours\n  [newsletter]: https://cpco.io/newsletter?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=newsletter\n  [discourse]: https://ask.sweetops.com/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=discourse\n  [email]: https://cpco.io/email?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=email\n  [commercial_support]: https://cpco.io/commercial-support?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=commercial_support\n  [we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=we_love_open_source\n  [terraform_modules]: https://cpco.io/terraform-modules?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=terraform_modules\n  [readme_header_img]: https://cloudposse.com/readme/header/img\n  [readme_header_link]: https://cloudposse.com/readme/header/link?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=readme_header_link\n  [readme_footer_img]: https://cloudposse.com/readme/footer/img\n  [readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=readme_footer_link\n  [readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img\n  [readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=zeroae/terraform-rsa-encrypt\u0026utm_content=readme_commercial_support_link\n  [share_twitter]: https://twitter.com/intent/tweet/?text=terraform-rsa-encrypt\u0026url=https://github.com/zeroae/terraform-rsa-encrypt\n  [share_linkedin]: https://www.linkedin.com/shareArticle?mini=true\u0026title=terraform-rsa-encrypt\u0026url=https://github.com/zeroae/terraform-rsa-encrypt\n  [share_reddit]: https://reddit.com/submit/?url=https://github.com/zeroae/terraform-rsa-encrypt\n  [share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/zeroae/terraform-rsa-encrypt\n  [share_googleplus]: https://plus.google.com/share?url=https://github.com/zeroae/terraform-rsa-encrypt\n  [share_email]: mailto:?subject=terraform-rsa-encrypt\u0026body=https://github.com/zeroae/terraform-rsa-encrypt\n  [beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/zeroae/terraform-rsa-encrypt?pixel\u0026cs=github\u0026cm=readme\u0026an=terraform-rsa-encrypt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroae%2Fterraform-shell-rsa-encrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroae%2Fterraform-shell-rsa-encrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroae%2Fterraform-shell-rsa-encrypt/lists"}