From 259ec871005f38dd3147c297b5d4796b96acb8af Mon Sep 17 00:00:00 2001 From: Mohamed ER-Radi Date: Wed, 31 Jan 2024 19:15:27 +0100 Subject: [PATCH] add ssh certificate config --- terraform/main.tf | 1 + terraform/terraform.tfvars | 1 + terraform/variables.tf | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/terraform/main.tf b/terraform/main.tf index 133480260..24c92a93e 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -71,6 +71,7 @@ output "server_public_ip" { resource "aws_instance" "ec2-staging" { ami = var.ami_id instance_type = var.instance_type + key_name = var.key_pair availability_zone = var.ec2_availability_zone network_interface { diff --git a/terraform/terraform.tfvars b/terraform/terraform.tfvars index 2e75fe860..4dde34b29 100644 --- a/terraform/terraform.tfvars +++ b/terraform/terraform.tfvars @@ -6,3 +6,4 @@ subnet_id = "subnet-d5a1d598" ami_id = "ami-072056ff9d3689e7b" instance_type = "t2.micro" ec2_availability_zone = "eu-west-3c" +key_pair = "parlemonde-staging" diff --git a/terraform/variables.tf b/terraform/variables.tf index a009ba853..d38c530f7 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -39,3 +39,8 @@ variable "ec2_availability_zone" { description = "EC2 Availability Zone" type = string } + +variable "key_pair" { + description = "EC2 staging key pair" + type = string +}