-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from RohitSquareops/main
updated readme.md, added output, indentation
- Loading branch information
Showing
7 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
provider "aws" { | ||
region = local.region | ||
} | ||
|
||
locals { | ||
name = "key" | ||
region = "us-east-2" | ||
environment = "prod" | ||
region = "us-east-1" | ||
name = "skaf" | ||
additional_tags = { | ||
Owner = "organization_name" | ||
Expires = "Never" | ||
Department = "Engineering" | ||
} | ||
} | ||
|
||
################################################################################ | ||
# Key Pair Module | ||
################################################################################ | ||
|
||
module "key_pair" { | ||
source = "squareops/keypair/aws" | ||
|
||
source = "squareops/keypair/aws" | ||
key_name = format("%s-%s-kp", local.environment, local.name) | ||
ssm_parameter_path = format("%s-%s-ssm", local.environment, local.name) #SSM parameter secret name | ||
environment = local.environment | ||
|
||
ssm_parameter_path = format("%s-%s-ssm", local.environment, local.name) #SSM parameter secret name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
output "key_pair_name" { | ||
description = "The key pair name." | ||
description = "The name of the key pair generated for the EC2 instance." | ||
value = module.key_pair.key_pair_name | ||
} | ||
|
||
output "ssm_parameter_arn" { | ||
description = "The Amazon Resource Name (ARN) of the SSM parameter used to store the EC2 instance key pair." | ||
value = module.key_pair.ssm_parameter_arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
provider "aws" { | ||
region = local.region | ||
default_tags { | ||
tags = local.additional_tags | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
output "key_pair_name" { | ||
description = "The key pair name." | ||
description = "The name of the key pair generated for the EC2 instance." | ||
value = module.key_pair.key_pair_name | ||
} | ||
|
||
output "ssm_parameter_arn" { | ||
description = "The SSM parameter ARN of key pair." | ||
description = "The Amazon Resource Name (ARN) of the SSM parameter used to store the EC2 instance key pair." | ||
value = aws_ssm_parameter.ssm_ec2_keypair.arn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
variable "key_name" { | ||
description = "The name for the key pair to be generated" | ||
description = "Specifies the name to be assigned to the key pair that will be generated." | ||
default = "" | ||
type = string | ||
} | ||
|
||
variable "environment" { | ||
description = "Environment identifier for the key pair" | ||
description = "Specifies the identifier for the environment where the key pair will be used." | ||
default = "" | ||
type = string | ||
} | ||
|
||
variable "ssm_parameter_path" { | ||
description = "The name of the ssm parameter for storing the keypair" | ||
description = "Specifies the SSM parameter name that will be used to store the generated key pair." | ||
default = "/example/ssm" | ||
type = string | ||
} |