Skip to content

Commit 5e8b4d7

Browse files
authored
Release 1.0.3 (#9)
1 parent bb56bc6 commit 5e8b4d7

File tree

15 files changed

+63
-21
lines changed

15 files changed

+63
-21
lines changed

.gitignore

100644100755
File mode changed.

.pre-commit-config.yaml

100644100755
File mode changed.

.tflint.hcl

100644100755
File mode changed.

IAM.md

100644100755
File mode changed.

LICENSE

100644100755
File mode changed.

README.md

100644100755
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# AWS EC2 Keypair
2-
![squareops_avatar]
3-
4-
[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="https://squareops.com/wp-content/uploads/2020/05/Squareops-png-white.png1-3.png">
4+
<source media="(prefers-color-scheme: light)" srcset="https://squareops.com/wp-content/uploads/2021/09/Squareops-png-1-1.png">
5+
<img src="https://squareops.com/wp-content/uploads/2021/09/Squareops-png-1-1.png">
6+
</picture>
57

68
### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey.
79
<br>
@@ -56,7 +58,7 @@ The required IAM permissions to create resources from this module can be found [
5658

5759
| Name | Source | Version |
5860
|------|--------|---------|
59-
| <a name="module_key_pair"></a> [key\_pair](#module\_key\_pair) | terraform-aws-modules/key-pair/aws | 2.0.0 |
61+
| <a name="module_key_pair"></a> [key\_pair](#module\_key\_pair) | terraform-aws-modules/key-pair/aws | 2.0.3 |
6062

6163
## Resources
6264

@@ -68,9 +70,13 @@ The required IAM permissions to create resources from this module can be found [
6870

6971
| Name | Description | Type | Default | Required |
7072
|------|-------------|------|---------|:--------:|
73+
| <a name="input_additional_aws_tags"></a> [additional\_aws\_tags](#input\_additional\_aws\_tags) | Additional tags to be applied to AWS resources. | `map(string)` | `{}` | no |
74+
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | Name of the AWS region where S3 bucket is to be created. | `string` | `"us-east-1"` | no |
75+
| <a name="input_create_private_key"></a> [create\_private\_key](#input\_create\_private\_key) | Whether to create the private key or not. | `bool` | `true` | no |
7176
| <a name="input_environment"></a> [environment](#input\_environment) | Specifies the identifier for the environment where the key pair will be used. | `string` | `""` | no |
72-
| <a name="input_key_name"></a> [key\_name](#input\_key\_name) | Specifies the name to be assigned to the key pair that will be generated. | `string` | `""` | no |
77+
| <a name="input_key_pair_name"></a> [key\_pair\_name](#input\_key\_pair\_name) | Specifies the name to be assigned to the key pair that will be generated. | `string` | `""` | no |
7378
| <a name="input_ssm_parameter_path"></a> [ssm\_parameter\_path](#input\_ssm\_parameter\_path) | Specifies the SSM parameter name that will be used to store the generated key pair. | `string` | `"/example/ssm"` | no |
79+
| <a name="input_tags"></a> [tags](#input\_tags) | Tags to be applied to AWS resources. | `map(string)` | <pre>{<br> "Environment": "",<br> "Name": "",<br> "cost": ""<br>}</pre> | no |
7480

7581
## Outputs
7682

examples/complete/README.md

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ No providers.
3232

3333
| Name | Source | Version |
3434
|------|--------|---------|
35-
| <a name="module_key_pair"></a> [key\_pair](#module\_key\_pair) | squareops/keypair/aws | n/a |
35+
| <a name="module_key_pair"></a> [key\_pair](#module\_key\_pair) | ../../ | n/a |
3636

3737
## Resources
3838

examples/complete/main.tf

100644100755
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1+
# Local Variables declaration
12
locals {
23
name = "key"
3-
region = "us-east-2"
4+
aws_region = "us-east-2"
45
environment = "prod"
5-
additional_tags = {
6+
tags = {
7+
Environment = "stg"
8+
Name = "key_pair"
9+
cost = format("%s-%s-kp", local.environment, local.name)
10+
}
11+
additional_aws_tags = {
612
Owner = "organization_name"
713
Expires = "Never"
814
Department = "Engineering"
915
}
1016
}
1117

18+
# Using "squareops/keypair/aws" module to generate an EC2 key pair and storing it in ssm parameter store.
1219
module "key_pair" {
1320
source = "squareops/keypair/aws"
14-
key_name = format("%s-%s-kp", local.environment, local.name)
21+
version = "1.0.2"
22+
key_pair_name = format("%s-%s-kp", local.environment, local.name)
1523
environment = local.environment
1624
ssm_parameter_path = format("%s-%s-ssm", local.environment, local.name) #SSM parameter secret name
25+
tags = local.tags
1726
}

examples/complete/outputs.tf

100644100755
File mode changed.

examples/complete/provider.tf

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
provider "aws" {
2-
region = local.region
2+
region = local.aws_region
33
default_tags {
4-
tags = local.additional_tags
4+
tags = local.additional_aws_tags
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)