Skip to content

Commit 0e7ba72

Browse files
committed
Added .editorconfig file and fixed missing EOL's on files
1 parent 7c8e0e3 commit 0e7ba72

File tree

16 files changed

+22
-16
lines changed

16 files changed

+22
-16
lines changed

modules/aws/ec2/examples/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,3 @@ DATABASE_ENGINE=django.db.backends.mysql
103103
EOL
104104
EOF
105105
}
106-

modules/aws/ec2/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,20 @@ resource "aws_iam_role_policy_attachment" "instance_role" {
4646
}
4747

4848
resource "tls_private_key" "private_key" {
49+
count = var.custom_ssh_key == "" ? 0 : 1
4950
algorithm = "RSA"
5051
rsa_bits = 4096
5152
}
5253

5354
resource "aws_key_pair" "key_pair" {
55+
count = var.custom_ssh_key == "" ? 0 : 1
5456
key_name = "${var.project_name}-key-pair"
5557
public_key = tls_private_key.private_key.public_key_openssh
5658
}
5759

5860
resource "aws_instance" "ec2" {
5961
instance_type = var.ec2_instance_type
60-
key_name = aws_key_pair.key_pair.key_name
62+
key_name = var aws_key_pair.key_pair.key_name
6163
ami = var.ami_id
6264
metadata_options {
6365
http_endpoint = "enabled"

modules/aws/ec2/output.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ output "private_key" {
1212
value = tls_private_key.private_key.private_key_pem
1313
description = "This outputs the private key."
1414
sensitive = true
15-
}
15+
}

modules/aws/ec2/variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,10 @@ variable "user_data_replace_on_change" {
6262
type = bool
6363
default = true
6464
description = "This value indicates whether changes to the `user_data` value triggers a rebuild of the EC2 instance."
65-
}
65+
}
66+
67+
variable "custom_ssh_key" {
68+
type = string
69+
description = "Provide a SSH Key to have that key used for this box, by default the SSH key will be managed by this module"
70+
default = ""
71+
}

modules/aws/rds_serverless_cluster/examples/example.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ module "rds_cluster_setup" {
5656
database_security_groups = [aws_security_group.aws_sg.id]
5757
replicate_on_availability_zones = [module.vpc_subnet.az_zones[1]]
5858
prevent_deletion = false
59-
}
59+
}

modules/aws/rds_serverless_cluster/examples/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ output "rds_cluster_replica_instance_endpoints" {
2121
}
2222
output "rds_cluster_replica_instance_ports" {
2323
value = module.rds_cluster_setup.rds_cluster_replica_instance_ports
24-
}
24+
}

modules/aws/rds_serverless_cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ resource "random_password" "password" {
110110

111111
resource "random_id" "secrets_id" {
112112
byte_length = 8
113-
}
113+
}

modules/aws/rds_serverless_cluster/output.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ output "rds_cluster_master_password" {
3333
output "rds_cluster_instance_db_name" {
3434
value = aws_rds_cluster.rds_cluster.database_name
3535
description = "This is the name of the database created. This value should be used when referencing the `DATABASE_NAME` in your configuration. This output is of type `string`."
36-
}
36+
}

modules/aws/rds_serverless_cluster/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ variable "database_auto_minor_version_upgrade" {
100100

101101
variable "prevent_deletion" {
102102
type = bool
103-
}
103+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
locals {
22
state_management_key = "global/${var.environment}/s3/terraform.tfstate"
3-
}
3+
}

0 commit comments

Comments
 (0)