├── .deepsource.toml ├── Makefile ├── .github ├── CODEOWNERS ├── workflows │ ├── tfsec.yml │ ├── tflint.yml │ ├── tf-checks.yml │ ├── changelog.yml │ ├── automerge.yml │ ├── auto_assignee.yml │ └── readme.yml ├── PULL_REQUEST_TEMPLATE.md └── dependabot.yml ├── examples ├── versions.tf ├── example.tf └── outputs.tf ├── versions.tf ├── .pre-commit-config.yaml ├── outputs.tf ├── main.tf ├── docs └── io.md ├── variables.tf ├── README.yaml ├── .gitignore ├── CHANGELOG.md ├── README.md └── LICENSE /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[analyzers]] 4 | name = "terraform" -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export GENIE_PATH ?= $(shell 'pwd')/../../../genie 2 | 3 | include $(GENIE_PATH)/Makefile 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in the repo. 2 | * @anmolnagpal @clouddrove/approvers @clouddrove-ci -------------------------------------------------------------------------------- /examples/versions.tf: -------------------------------------------------------------------------------- 1 | # Terraform version 2 | terraform { 3 | required_version = ">= 1.6.6" 4 | 5 | required_providers { 6 | aws = { 7 | source = "hashicorp/aws" 8 | version = ">= 5.31.0" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /.github/workflows/tfsec.yml: -------------------------------------------------------------------------------- 1 | name: tfsec 2 | permissions: write-all 3 | on: 4 | pull_request: 5 | workflow_dispatch: 6 | jobs: 7 | tfsec: 8 | uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master 9 | secrets: inherit 10 | with: 11 | working_directory: '.' 12 | -------------------------------------------------------------------------------- /.github/workflows/tflint.yml: -------------------------------------------------------------------------------- 1 | name: tf-lint 2 | on: 3 | push: 4 | branches: [ master ] 5 | pull_request: 6 | workflow_dispatch: 7 | jobs: 8 | tf-lint: 9 | uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@master 10 | secrets: 11 | GITHUB: ${{ secrets.GITHUB }} 12 | -------------------------------------------------------------------------------- /versions.tf: -------------------------------------------------------------------------------- 1 | # Terraform version 2 | terraform { 3 | required_version = ">= 1.6.6" 4 | 5 | required_providers { 6 | aws = { 7 | source = "hashicorp/aws" 8 | version = ">= 5.31.0" 9 | } 10 | tls = { 11 | source = "hashicorp/tls" 12 | version = ">= 4.0.4" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /.github/workflows/tf-checks.yml: -------------------------------------------------------------------------------- 1 | name: tf-checks 2 | on: 3 | push: 4 | branches: [ master ] 5 | pull_request: 6 | workflow_dispatch: 7 | jobs: 8 | tf-checks-example: 9 | uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master 10 | with: 11 | working_directory: './examples/' 12 | -------------------------------------------------------------------------------- /.github/workflows/changelog.yml: -------------------------------------------------------------------------------- 1 | name: changelog 2 | permissions: write-all 3 | on: 4 | push: 5 | tags: 6 | - "*" 7 | workflow_dispatch: 8 | jobs: 9 | changelog: 10 | uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master 11 | secrets: inherit 12 | with: 13 | branch: 'master' 14 | -------------------------------------------------------------------------------- /.github/workflows/automerge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Auto merge 3 | on: 4 | pull_request: 5 | jobs: 6 | auto-merge: 7 | uses: clouddrove/github-shared-workflows/.github/workflows/auto_merge.yml@master 8 | secrets: 9 | GITHUB: ${{ secrets.GITHUB }} 10 | with: 11 | tfcheck: 'tf-checks-example / Check code format' 12 | ... 13 | -------------------------------------------------------------------------------- /.github/workflows/auto_assignee.yml: -------------------------------------------------------------------------------- 1 | name: Auto Assign PRs 2 | on: 3 | pull_request: 4 | types: [opened, reopened] 5 | workflow_dispatch: 6 | jobs: 7 | assignee: 8 | uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master 9 | secrets: 10 | GITHUB: ${{ secrets.GITHUB }} 11 | with: 12 | assignees: 'clouddrove-ci' 13 | -------------------------------------------------------------------------------- /.github/workflows/readme.yml: -------------------------------------------------------------------------------- 1 | name: Readme Workflow 2 | on: 3 | push: 4 | branches: 5 | - master 6 | paths-ignore: 7 | - 'README.md' 8 | workflow_dispatch: 9 | jobs: 10 | README: 11 | uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master 12 | secrets: 13 | TOKEN : ${{ secrets.GITHUB }} 14 | SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} 15 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## what 2 | * Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?) 3 | * Use bullet points to be concise and to the point. 4 | 5 | ## why 6 | * Provide the justifications for the changes (e.g. business case). 7 | * Describe why these changes were made (e.g. why do these commits fix the problem?) 8 | * Use bullet points to be concise and to the point. 9 | 10 | ## references 11 | * Link to any supporting jira issues or helpful documentation to add some context (e.g. stackoverflow). 12 | * Use `closes #123`, if this PR closes a Jira issue `#123` 13 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | 3 | - repo: https://github.com/gruntwork-io/pre-commit 4 | rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases 5 | hooks: 6 | - id: terraform-fmt 7 | - id: shellcheck 8 | - id: tflint 9 | 10 | - repo: git://github.com/pre-commit/pre-commit-hooks 11 | rev: v4.0.1 # Use the ref you want to point at 12 | hooks: 13 | - id: end-of-file-fixer 14 | - id: trailing-whitespace 15 | - id: mixed-line-ending 16 | - id: check-byte-order-marker 17 | - id: check-executables-have-shebangs 18 | - id: check-merge-conflict 19 | - id: debug-statements 20 | - id: check-yaml 21 | - id: check-added-large-files 22 | -------------------------------------------------------------------------------- /examples/example.tf: -------------------------------------------------------------------------------- 1 | ####---------------------------------------------------------------------------------- 2 | ## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS. 3 | ####---------------------------------------------------------------------------------- 4 | provider "aws" { 5 | region = "eu-west-1" 6 | } 7 | 8 | ####---------------------------------------------------------------------------------- 9 | ## Module : KEY PAIR 10 | ## Terraform module for generating or importing an SSH public key file into AWS. 11 | ####---------------------------------------------------------------------------------- 12 | module "keypair" { 13 | source = "../" 14 | 15 | name = "key" 16 | environment = "test" 17 | label_order = ["environment", "name"] 18 | 19 | public_key = "XXXXXXXXXXXXXX" 20 | enable_private_key = true 21 | enable_key_pair = true 22 | } 23 | -------------------------------------------------------------------------------- /examples/outputs.tf: -------------------------------------------------------------------------------- 1 | output "name" { 2 | value = module.keypair[*].name 3 | description = "Name of SSH key." 4 | } 5 | 6 | output "id" { 7 | value = module.keypair[*].arn 8 | description = "The key pair name." 9 | } 10 | 11 | output "arn" { 12 | value = module.keypair[*].id 13 | description = "The key pair ARN." 14 | } 15 | 16 | output "private_key_id" { 17 | value = module.keypair[*].private_key_id 18 | description = "Unique identifier for this resource: hexadecimal representation of the SHA1 checksum of the resource" 19 | } 20 | 21 | output "public_key_openssh" { 22 | value = module.keypair[*].public_key_openssh 23 | description = "The public key data in \"Authorized Keys\" format. This is populated only if the configured private key is supported: this includes all `RSA` and `ED25519` keys" 24 | } 25 | 26 | output "public_key_pem" { 27 | value = module.keypair[*].public_key_pem 28 | description = "Public key data in PEM (RFC 1421) format" 29 | } -------------------------------------------------------------------------------- /outputs.tf: -------------------------------------------------------------------------------- 1 | #Module : KEY PAIR 2 | #Description : Terraform module key pair outputs. 3 | output "name" { 4 | value = join("", aws_key_pair.default[*].key_name) 5 | description = "Name of SSH key." 6 | } 7 | 8 | output "id" { 9 | value = join("", aws_key_pair.default[*].id) 10 | description = "The key pair name." 11 | } 12 | 13 | output "arn" { 14 | value = join("", aws_key_pair.default[*].arn) 15 | description = "The key pair ARN." 16 | } 17 | output "private_key_id" { 18 | value = try(tls_private_key.default[0][*].id, "") 19 | description = "Unique identifier for this resource: hexadecimal representation of the SHA1 checksum of the resource" 20 | } 21 | 22 | output "public_key_openssh" { 23 | value = try(trimspace(tls_private_key.default[0].public_key_openssh), "") 24 | description = "The public key data in \"Authorized Keys\" format. This is populated only if the configured private key is supported: this includes all `RSA` and `ED25519` keys" 25 | } 26 | 27 | output "public_key_pem" { 28 | value = try(trimspace(tls_private_key.default[0].public_key_pem), "") 29 | description = "Public key data in PEM (RFC 1421) format" 30 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | open-pull-requests-limit: 3 14 | assignees: 15 | - "clouddrove-ci" 16 | reviewers: 17 | - "approvers" 18 | 19 | - package-ecosystem: "terraform" # See documentation for possible values 20 | directory: "/" # Location of package manifests 21 | schedule: 22 | interval: "weekly" 23 | # Add assignees 24 | assignees: 25 | - "clouddrove-ci" 26 | # Add reviewer 27 | reviewers: 28 | - "approvers" 29 | # Allow up to 3 open pull requests for pip dependencies 30 | open-pull-requests-limit: 3 31 | 32 | - package-ecosystem: "terraform" # See documentation for possible values 33 | directory: "/examples/" # Location of package manifests 34 | schedule: 35 | interval: "weekly" 36 | # Add assignees 37 | assignees: 38 | - "clouddrove-ci" 39 | # Add reviewer 40 | reviewers: 41 | - "approvers" 42 | # Allow up to 3 open pull requests for pip dependencies 43 | open-pull-requests-limit: 3 44 | -------------------------------------------------------------------------------- /main.tf: -------------------------------------------------------------------------------- 1 | ##---------------------------------------------------------------------------------- 2 | ## This terraform module is designed to generate consistent label names and 3 | ## tags for resources. You can use terraform-labels to implement a strict naming convention. 4 | ##---------------------------------------------------------------------------------- 5 | module "labels" { 6 | source = "clouddrove/labels/aws" 7 | version = "1.3.0" 8 | 9 | name = var.name 10 | environment = var.environment 11 | repository = var.repository 12 | attributes = var.attributes 13 | label_order = var.label_order 14 | managedby = var.managedby 15 | } 16 | 17 | ##---------------------------------------------------------------------------------- 18 | ## resource for generating or importing an SSH public key file into AWS. 19 | ##---------------------------------------------------------------------------------- 20 | resource "aws_key_pair" "default" { 21 | count = var.enable_key_pair ? 1 : 0 22 | 23 | key_name = format("%s-pair", module.labels.id) 24 | public_key = var.public_key == "" ? trimspace(tls_private_key.default[0].public_key_openssh) : var.public_key 25 | 26 | tags = module.labels.tags 27 | } 28 | 29 | ##---------------------------------------------------------------------------------- 30 | ## resource for generating or importing an SSH private key file into AWS. 31 | ##---------------------------------------------------------------------------------- 32 | 33 | resource "tls_private_key" "default" { 34 | count = var.enable_key_pair && var.enable_private_key ? 1 : 0 35 | 36 | algorithm = var.private_key_algorithm 37 | rsa_bits = var.private_key_rsa_bits 38 | } -------------------------------------------------------------------------------- /docs/io.md: -------------------------------------------------------------------------------- 1 | ## Inputs 2 | 3 | | Name | Description | Type | Default | Required | 4 | |------|-------------|------|---------|:--------:| 5 | | attributes | Additional attributes (e.g. `1`). | `list(string)` | `[]` | no | 6 | | enable\_key\_pair | A boolean flag to enable/disable key pair. | `bool` | `true` | no | 7 | | enable\_private\_key | Determines whether a private key will be created | `bool` | `false` | no | 8 | | environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no | 9 | | label\_order | label order, e.g. `name`,`application`. | `list(any)` | `[]` | no | 10 | | managedby | ManagedBy, eg 'CloudDrove'. | `string` | `"hello@clouddrove.com"` | no | 11 | | name | Name (e.g. `app` or `cluster`). | `string` | `""` | no | 12 | | private\_key\_algorithm | Name of the algorithm to use when generating the private key. Currently-supported values are `RSA` and `ED25519` | `string` | `"RSA"` | no | 13 | | private\_key\_rsa\_bits | When algorithm is `RSA`, the size of the generated RSA key, in bits (default: `4096`) | `number` | `4096` | no | 14 | | public\_key | Name (e.g. `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQ`). | `string` | `""` | no | 15 | | repository | Terraform current module repo | `string` | `"https://github.com/clouddrove/terraform-aws-keypair"` | no | 16 | 17 | ## Outputs 18 | 19 | | Name | Description | 20 | |------|-------------| 21 | | arn | The key pair ARN. | 22 | | id | The key pair name. | 23 | | name | Name of SSH key. | 24 | | private\_key\_id | Unique identifier for this resource: hexadecimal representation of the SHA1 checksum of the resource | 25 | | public\_key\_openssh | The public key data in "Authorized Keys" format. This is populated only if the configured private key is supported: this includes all `RSA` and `ED25519` keys | 26 | | public\_key\_pem | Public key data in PEM (RFC 1421) format | 27 | 28 | -------------------------------------------------------------------------------- /variables.tf: -------------------------------------------------------------------------------- 1 | #Module : LABEL 2 | #Description : Terraform label module variables. 3 | variable "name" { 4 | type = string 5 | default = "" 6 | description = "Name (e.g. `app` or `cluster`)." 7 | } 8 | 9 | variable "repository" { 10 | type = string 11 | default = "https://github.com/clouddrove/terraform-aws-keypair" 12 | description = "Terraform current module repo" 13 | } 14 | 15 | variable "environment" { 16 | type = string 17 | default = "" 18 | description = "Environment (e.g. `prod`, `dev`, `staging`)." 19 | } 20 | 21 | variable "label_order" { 22 | type = list(any) 23 | default = [] 24 | description = "label order, e.g. `name`,`application`." 25 | } 26 | 27 | variable "attributes" { 28 | type = list(string) 29 | default = [] 30 | description = "Additional attributes (e.g. `1`)." 31 | } 32 | 33 | variable "managedby" { 34 | type = string 35 | default = "hello@clouddrove.com" 36 | description = "ManagedBy, eg 'CloudDrove'." 37 | } 38 | 39 | #Module : KEY PAIR module variables. 40 | variable "public_key" { 41 | type = string 42 | default = "" 43 | description = "Name (e.g. `ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQ`)." 44 | sensitive = true 45 | } 46 | 47 | variable "enable_key_pair" { 48 | type = bool 49 | default = true 50 | description = "A boolean flag to enable/disable key pair." 51 | } 52 | 53 | # : PRIVATE KEY 54 | variable "enable_private_key" { 55 | type = bool 56 | default = false 57 | description = "Determines whether a private key will be created" 58 | } 59 | variable "private_key_algorithm" { 60 | type = string 61 | default = "RSA" 62 | description = "Name of the algorithm to use when generating the private key. Currently-supported values are `RSA` and `ED25519`" 63 | } 64 | 65 | variable "private_key_rsa_bits" { 66 | type = number 67 | default = 4096 68 | description = "When algorithm is `RSA`, the size of the generated RSA key, in bits (default: `4096`)" 69 | } -------------------------------------------------------------------------------- /README.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # 3 | # This is the canonical configuration for the `README.md` 4 | # Run `make readme` to rebuild the `README.md` 5 | # 6 | 7 | # Name of this project 8 | name: Terraform AWS Keypair 9 | 10 | # License of this project 11 | license: "APACHE" 12 | 13 | # Canonical GitHub repo 14 | github_repo: clouddrove/terraform-aws-keypair 15 | 16 | # Badges to display 17 | badges: 18 | - name: "Latest Release" 19 | image: "https://img.shields.io/github/release/clouddrove/terraform-aws-keypair.svg" 20 | url: "https://github.com/clouddrove/terraform-aws-keypair/releases/latest" 21 | - name: "tfsec" 22 | image: "https://github.com/clouddrove/terraform-aws-keypair/actions/workflows/tfsec.yml/badge.svg" 23 | url: "https://github.com/clouddrove/terraform-aws-keypair/actions/workflows/tfsec.yml" 24 | - name: "Licence" 25 | image: "https://img.shields.io/badge/License-APACHE-blue.svg" 26 | url: "LICENSE.md" 27 | - name: "Changelog" 28 | image: "https://img.shields.io/badge/Changelog-blue" 29 | url: "CHANGELOG.md" 30 | 31 | prerequesties: 32 | - name: Terraform 33 | url: https://learn.hashicorp.com/terraform/getting-started/install.html 34 | version: ">= 1.6.6" 35 | 36 | providers: 37 | - name: aws 38 | url: https://aws.amazon.com/ 39 | version: ">= 5.31.0" 40 | 41 | module_dependencies: 42 | - name: Labels Module 43 | url: https://github.com/clouddrove/terraform-aws-labels 44 | description: Provides resource tagging. 45 | # description of this project 46 | description: |- 47 | Terraform module for generating or importing an SSH public key file into AWS. 48 | 49 | # How to use this project 50 | # yamllint disable rule:line-length 51 | usage: |- 52 | ### Simple Example 53 | Here is an example of how you can use this module in your inventory structure: 54 | ```hcl 55 | module "keypair" { 56 | source = "clouddrove/keypair/aws" 57 | version = "1.3.0" 58 | public_key = "" 59 | create_private_key_enabled = true 60 | enable_key_pair = true 61 | } 62 | ``` 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignored files 2 | *~ 3 | 4 | # temporary files which can be created if a process still has a handle open of a deleted file 5 | .fuse_hidden* 6 | 7 | # KDE directory preferences 8 | .directory 9 | 10 | # Linux trash folder which might appear on any partition or disk 11 | .Trash-* 12 | 13 | # .nfs files are created when an open file is removed but is still being accessed 14 | .nfs* 15 | ### Eclipse template 16 | 17 | .metadata 18 | bin/ 19 | tmp/ 20 | *.tmp 21 | *.bak 22 | *.swp 23 | *~.nib 24 | local.properties 25 | .settings/ 26 | .loadpath 27 | .recommenders 28 | 29 | # External tool builders 30 | .externalToolBuilders/ 31 | 32 | # Locally stored "Eclipse launch configurations" 33 | *.launch 34 | 35 | # PyDev specific (Python IDE for Eclipse) 36 | *.pydevproject 37 | 38 | # CDT-specific (C/C++ Development Tooling) 39 | .cproject 40 | 41 | # Java annotation processor (APT) 42 | .factorypath 43 | 44 | # PDT-specific (PHP Development Tools) 45 | .buildpath 46 | 47 | # sbteclipse plugin 48 | .target 49 | 50 | # Tern plugin 51 | .tern-project 52 | 53 | # TeXlipse plugin 54 | .texlipse 55 | 56 | # STS (Spring Tool Suite) 57 | .springBeans 58 | 59 | # Code Recommenders 60 | .recommenders/ 61 | 62 | # Scala IDE specific (Scala & Java development for Eclipse) 63 | .cache-main 64 | .scala_dependencies 65 | .worksheet 66 | ### Windows template 67 | # Windows thumbnail cache files 68 | Thumbs.db 69 | ehthumbs.db 70 | ehthumbs_vista.db 71 | 72 | # Dump file 73 | *.stackdump 74 | 75 | # Folder config file 76 | [Dd]esktop.ini 77 | 78 | # Recycle Bin used on file shares 79 | $RECYCLE.BIN/ 80 | 81 | # Windows Installer files 82 | *.cab 83 | *.msi 84 | *.msm 85 | *.msp 86 | 87 | # Windows shortcuts 88 | *.lnk 89 | ### Ansible template 90 | *.retry 91 | ### macOS template 92 | # General 93 | .DS_Store 94 | .AppleDouble 95 | .LSOverride 96 | 97 | # Icon must end with two \r 98 | Icon 99 | 100 | # Thumbnails 101 | ._* 102 | 103 | # Files that might appear in the root of a volume 104 | .DocumentRevisions-V100 105 | .fseventsd 106 | .Spotlight-V100 107 | .TemporaryItems 108 | .Trashes 109 | .VolumeIcon.icns 110 | .com.apple.timemachine.donotpresent 111 | 112 | # Directories potentially created on remote AFP share 113 | .AppleDB 114 | .AppleDesktop 115 | Network Trash Folder 116 | Temporary Items 117 | .apdisk 118 | ### Archives template 119 | # It's better to unpack these files and commit the raw source because 120 | # git has its own built in compression methods. 121 | *.7z 122 | *.jar 123 | *.rar 124 | *.zip 125 | *.gz 126 | *.tgz 127 | *.bzip 128 | *.bz2 129 | *.xz 130 | *.lzma 131 | *.cab 132 | 133 | # Packing-only formats 134 | *.iso 135 | *.tar 136 | 137 | # Package management formats 138 | *.dmg 139 | *.xpi 140 | *.gem 141 | *.egg 142 | *.deb 143 | *.rpm 144 | *.msi 145 | *.msm 146 | *.msp 147 | ### JetBrains template 148 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 149 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 150 | 151 | /.idea/ 152 | # User-specific stuff: 153 | .idea/**/workspace.xml 154 | .idea/**/tasks.xml 155 | .idea/dictionaries 156 | 157 | # Sensitive or high-churn files: 158 | .idea/**/dataSources/ 159 | .idea/**/dataSources.ids 160 | .idea/**/dataSources.xml 161 | .idea/**/dataSources.local.xml 162 | .idea/**/sqlDataSources.xml 163 | .idea/**/dynamic.xml 164 | .idea/**/uiDesigner.xml 165 | 166 | # Gradle: 167 | .idea/**/gradle.xml 168 | .idea/**/libraries 169 | 170 | # CMake 171 | cmake-build-debug/ 172 | 173 | # Mongo Explorer plugin: 174 | .idea/**/mongoSettings.xml 175 | 176 | ## File-based project format: 177 | *.iws 178 | 179 | ## Plugin-specific files: 180 | 181 | # IntelliJ 182 | out/ 183 | 184 | # mpeltonen/sbt-idea plugin 185 | .idea_modules/ 186 | # User-specific stuff: 187 | .idea/* 188 | # JIRA plugin 189 | atlassian-ide-plugin.xml 190 | 191 | # Cursive Clojure plugin 192 | .idea/replstate.xml 193 | 194 | # TFstste 195 | *.tfstate* 196 | 197 | deployment/_logs/ansible-log.json 198 | deployment/_logs/ansible-log.log 199 | deployment/_logs/facts/* 200 | deployment/_logs/retry/* 201 | _app/* 202 | ansible-log.json 203 | .terraform 204 | terraform.tfstate 205 | 206 | *.tfstate 207 | *.tfstate.backup 208 | *.iml 209 | *.terraform.lock.hcl 210 | *.lock.hcl -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [1.3.1] - 2023-06-14 8 | ### :sparkles: New Features 9 | - [`cc88c9b`](https://github.com/clouddrove/terraform-aws-keypair/commit/cc88c9b6977d39dfe9a8c9cce5b996b543ce7bd0) - updated changelog.yml file *(commit by [@vibhutigoyal](https://github.com/vibhutigoyal))* 10 | - [`e6e966d`](https://github.com/clouddrove/terraform-aws-keypair/commit/e6e966d7bca024d3cebcb1704f7ce4f329f5b3a5) - add deepsource & added assignees,reviewer in dependabot *(commit by [@Tanveer143s](https://github.com/Tanveer143s))* 11 | - [`d61f81a`](https://github.com/clouddrove/terraform-aws-keypair/commit/d61f81aa5582f63f711af5809f732df0f6c76672) - update readme.yaml and version.tf *(commit by [@anmolnagpal](https://github.com/anmolnagpal))* 12 | - [`bbf09d3`](https://github.com/clouddrove/terraform-aws-keypair/commit/bbf09d3de8fd07f6e734a2532bdc654bfbaa9054) - update readme.yaml and version.tf *(commit by [@anmolnagpal](https://github.com/anmolnagpal))* 13 | - [`c49f202`](https://github.com/clouddrove/terraform-aws-keypair/commit/c49f202762fbb57c902a7723e9763d0504c3290a) - added resource *(commit by [@anmolnagpal](https://github.com/anmolnagpal))* 14 | - [`7dd81c4`](https://github.com/clouddrove/terraform-aws-keypair/commit/7dd81c4b74a0fcf1ad59472c9b72cbeeef698465) - added resource *(commit by [@anmolnagpal](https://github.com/anmolnagpal))* 15 | - [`400c86e`](https://github.com/clouddrove/terraform-aws-keypair/commit/400c86e72915442a816e3c20dc4aad4dc1585cc5) - added resource *(commit by [@anmolnagpal](https://github.com/anmolnagpal))* 16 | - [`5aad5b1`](https://github.com/clouddrove/terraform-aws-keypair/commit/5aad5b1afcde1f6502f3f0593ad97e13b3c627e9) - changes module description *(commit by [@anmolnagpal](https://github.com/anmolnagpal))* 17 | 18 | 19 | ## [v1.3.0] - 2022-12-30 20 | ### :bug: Bug Fixes 21 | - [`a7e8818`](https://github.com/clouddrove/terraform-aws-keypair/commit/a7e8818d098b5da9c56f5a5fc38a01a938e38d6d) - update workflows. 22 | 23 | 24 | ## [v1.0.1] - 2022-05-17 25 | ### :bug: Bug Fixes 26 | - [`74fdf48`](https://github.com/clouddrove/terraform-aws-keypair/commit/74fdf4815fab7969d9f75ad0529d2255504670e4) - fix labels tag 27 | - [`19a7bb6`](https://github.com/clouddrove/terraform-aws-keypair/commit/19a7bb6dcd3dafe56dc879fbfe1136c597df3510) - update tf letest version fix github-action 28 | 29 | 30 | ## [v0.15.0] - 2021-07-9 31 | ### :bug: Bug Fixes 32 | - [`0eac5e2`](https://github.com/clouddrove/terraform-aws-keypair/commit/0eac5e2c3e8635a323f7293ffec0241723d2146c) - Update README.yaml 33 | - [`74d5893`](https://github.com/clouddrove/terraform-aws-keypair/commit/74d5893345a1b061a3e2ebc26d2ba538ee0bc9a3) - update github-action 34 | - [`5ddb812`](https://github.com/clouddrove/terraform-aws-keypair/commit/5ddb812090e607c7490c173366cdd0795d2cc60b) - update github-action 35 | 36 | 37 | ## [v0.14.0] - 2020-01-20 38 | ### :bug: Bug Fixes 39 | - [`6414993`](https://github.com/clouddrove/terraform-aws-keypair/commit/6414993a1c291036a049c61a6d554065312d5895) - fix terratest 40 | - [`5a9dd9a`](https://github.com/clouddrove/terraform-aws-keypair/commit/5a9dd9ab46eef808f6befa08e367875b27d01e5c) - update module tags 41 | - [`18e37b5`](https://github.com/clouddrove/terraform-aws-keypair/commit/18e37b53afea4f79636cf5fe278cd68cbfcbec3a) - update labels version 42 | - [`64eb7b6`](https://github.com/clouddrove/terraform-aws-keypair/commit/64eb7b6242398781058249b86f5397c01458873e) - update readme version 43 | - [`6b3a809`](https://github.com/clouddrove/terraform-aws-keypair/commit/6b3a80977abc36ebf1aac37681f522923bab259e) - update in 0.15 44 | 45 | 46 | ## [v0.13.0] - 2020-10-20 47 | ### :bug: Bug Fixes 48 | - [`509060b`](https://github.com/clouddrove/terraform-aws-keypair/commit/509060b5a0c2044b0883326190e9fcf488b8f938) - Upgrade to 0.14 49 | - [`77fe3e2`](https://github.com/clouddrove/terraform-aws-keypair/commit/77fe3e247f599a56431e249f73a7448f4231d57a) - fix the attributes 50 | - [`6e2f738`](https://github.com/clouddrove/terraform-aws-keypair/commit/6e2f738345ae3c9a34c091125cf351904ccaff86) - change tag name in main.tf 51 | 52 | 53 | ## [v0.12.3] - 2020-09-3 54 | ### :bug: Bug Fixes 55 | - [`d9b6a1d`](https://github.com/clouddrove/terraform-aws-keypair/commit/d9b6a1db249679e587ad58abab8af2732bcc4bb1) - update terratest pipeline 56 | - [`a31ef92`](https://github.com/clouddrove/terraform-aws-keypair/commit/a31ef92db9ca832c5e238570283e9a1ca1f25151) - update file name 57 | - [`36f86a5`](https://github.com/clouddrove/terraform-aws-keypair/commit/36f86a5b2aff00c7c9c416a95e2750ee9a105d77) - update pre-commit & Terraform version 58 | - [`6675751`](https://github.com/clouddrove/terraform-aws-keypair/commit/66757511658ed58a0c08d28b75e098290dee19b6) - update readme.yml 59 | - [`57d576e`](https://github.com/clouddrove/terraform-aws-keypair/commit/57d576ee76f4dc1fc018ca1045771a20b137b29f) - added labels 60 | - [`cb0bbf4`](https://github.com/clouddrove/terraform-aws-keypair/commit/cb0bbf473006c130b3753cbe0ef455c5e5eef52a) - testing aws keypair pipeline 61 | 62 | 63 | ## [v0.12.2] - 2019-09-24 64 | ### :bug: Bug Fixes 65 | - [`e81b0a5`](https://github.com/clouddrove/terraform-aws-keypair/commit/e81b0a57589196ab529d69c27adb4f44f88cbe8a) - add new variable 66 | 67 | 68 | ## [v0.12.1] - 2019-09-05 69 | ### :bug: Bug Fixes 70 | - [`2cfc565`](https://github.com/clouddrove/terraform-aws-keypair/commit/2cfc5654436eddfdccdcb716ebb578eea63b4383) - fix the outputs 71 | 72 | 73 | ## [v0.12.0] - 2019-08-12 74 | ### :bug: Bug Fixes 75 | - [`ea2ab6a`](https://github.com/clouddrove/terraform-aws-keypair/commit/ea2ab6a858155f9a34faa9954052a5fbd9e4bf45) - update url 76 | 77 | 78 | ## [v0.11.0] - 2019-08-12 79 | ### :bug: Bug Fixes 80 | - [`9f72e94`](https://github.com/clouddrove/terraform-aws-keypair/commit/9f72e942562e04011fc81c33fca116debe46fc94) - terraform 0.12.0 81 | 82 | 83 | [v0.11.0]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.11.0...master 84 | [v0.12.0]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.11.0...0.12.0 85 | [v0.12.1]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.12.0...0.12.1 86 | [v0.12.2]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.12.1...0.12.2 87 | [v0.12.3]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.12.2...0.12.3 88 | [v0.13.0]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.12.3...0.13.0 89 | [v0.14.0]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.13.0...0.14.0 90 | [v0.15.0]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.14.0...0.15.0 91 | [v1.0.1]: https://github.com/clouddrove/terraform-aws-keypair/compare/0.15.0...1.0.1 92 | [v1.3.0]: https://github.com/clouddrove/terraform-aws-keypair/compare/1.0.1...1.3.0 93 | [1.3.1]: https://github.com/clouddrove/terraform-aws-keypair/compare/1.3.0...1.3.1 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [][website] 3 |
8 | With our comprehensive DevOps toolkit - streamline operations, automate workflows, enhance collaboration and, most importantly, deploy with confidence. 9 |
10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
We are The Cloud Experts!
181 |We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.
183 | 184 | [website]: https://clouddrove.com 185 | [blog]: https://blog.clouddrove.com 186 | [slack]: https://www.launchpass.com/devops-talks 187 | [github]: https://github.com/clouddrove 188 | [linkedin]: https://cpco.io/linkedin 189 | [twitter]: https://twitter.com/clouddrove/ 190 | [email]: https://clouddrove.com/contact-us.html 191 | [terraform_modules]: https://github.com/clouddrove?utf8=%E2%9C%93&q=terraform-&type=&language= 192 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2021 CloudDrove Inc. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. --------------------------------------------------------------------------------