From 248556477393eefc3587c06552cce203a6e230d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Placzy=C5=84ski?= Date: Mon, 26 Feb 2024 14:36:25 +0100 Subject: [PATCH] =?UTF-8?q?[#301]=20Add=20Micha=C5=82=20Sza=C5=82owski=20t?= =?UTF-8?q?o=20SSH=20access=20list=20for=20environment=20management?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit updates the user_data.sh script within the Terraform modules for govtool-EC2 instances. It adds Michał Szałowski to the list of users authorized for SSH access, thereby expanding the secure access management system to include a team leader. This change is a step towards fulfilling the secure credential sharing acceptance criterion by ensuring new team members like Michał have the necessary access to sensitive environments. --- infra/terraform/modules/govtool-ec2/main.tf | 2 +- infra/terraform/modules/govtool-ec2/user_data.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/terraform/modules/govtool-ec2/main.tf b/infra/terraform/modules/govtool-ec2/main.tf index f71417f05..40ad6f6cd 100644 --- a/infra/terraform/modules/govtool-ec2/main.tf +++ b/infra/terraform/modules/govtool-ec2/main.tf @@ -153,7 +153,7 @@ resource "aws_instance" "govtool" { } user_data = file("${path.module}/user_data.sh") - # user_data_replace_on_change = true + user_data_replace_on_change = false credit_specification { cpu_credits = "unlimited" diff --git a/infra/terraform/modules/govtool-ec2/user_data.sh b/infra/terraform/modules/govtool-ec2/user_data.sh index 6f9708ffe..79a7f1a06 100644 --- a/infra/terraform/modules/govtool-ec2/user_data.sh +++ b/infra/terraform/modules/govtool-ec2/user_data.sh @@ -2,7 +2,7 @@ # setup ssh access mkdir -p /home/ubuntu/.ssh -users="a.guderski,michal.jankun,p.placzynski" +users="a.guderski,michal.jankun,p.placzynski,michal.szalowski" curl --retry 5 --retry-delay 5 -L keys.binarapps.com/ssh/{$users} | tee -a /home/ubuntu/.ssh/authorized_keys echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKeM0HOF9szWhOfbQM8XkIfznORTtTaCJJStALYjQuy6 (voltaire-era-github-actions)" | tee -a /home/ubuntu/.ssh/authorized_keys chmod 700 /home/ubuntu/.ssh