From 17be2241c7b99d5eb1b66c849c9e8bf93240941e Mon Sep 17 00:00:00 2001 From: Jagadeesh-Bojanapu <132245171+Jagadeesh-Bojanapu@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:42:45 +0530 Subject: [PATCH 1/5] Update AMI and key name in main.tf --- main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index 88c1f72..81ce200 100644 --- a/main.tf +++ b/main.tf @@ -1,9 +1,9 @@ resource "aws_launch_template" "web_server_as" { name = "myproject" - image_id = "ami-02dfbd4ff395f2a1b" + image_id = "ami-0ea87431b78a82070" vpc_security_group_ids = [aws_security_group.web_server.id] instance_type = "t3.micro" - key_name = "march-kp" + key_name = "ECR-kp" tags = { Name = "DevOps" } @@ -15,7 +15,7 @@ resource "aws_launch_template" "web_server_as" { resource "aws_elb" "web_server_lb"{ name = "web-server-lb" security_groups = [aws_security_group.web_server.id] - subnets = ["subnet-05b5c04b3e4f5fc97", "subnet-078eaa4691fce41d5"] + subnets = ["subnet-0e90eaf0dbc2afd84", "subnet-023a12e130a6d0737"] listener { instance_port = 8000 instance_protocol = "http" From 21eaf72c9107d250f2f823235ad581c582fdca72 Mon Sep 17 00:00:00 2001 From: Jagadeesh-Bojanapu <132245171+Jagadeesh-Bojanapu@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:44:11 +0530 Subject: [PATCH 2/5] Change S3 bucket name and remove backend settings Updated S3 bucket name and removed backend configuration. --- s3.tf | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/s3.tf b/s3.tf index a4be87b..0a8eb2c 100644 --- a/s3.tf +++ b/s3.tf @@ -1,5 +1,5 @@ resource "aws_s3_bucket" "one" { - bucket = "mustafa77.flm77.moonobucket" + bucket = "Jagadeesh.2024.bucket" } resource "aws_s3_bucket_ownership_controls" "two" { @@ -23,12 +23,4 @@ status = "Enabled" } } -terraform { -backend "s3" { -region = "us-east-1" -bucket = "mustafa77.flm77.moonobucket" -key = "prod/terraform.tfstate" -} -} - From c8bc39f8f30a0533a3afb686d05e9dbf05dfce66 Mon Sep 17 00:00:00 2001 From: Jagadeesh-Bojanapu <132245171+Jagadeesh-Bojanapu@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:53:26 +0530 Subject: [PATCH 3/5] Fix S3 bucket name casing --- s3.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3.tf b/s3.tf index 0a8eb2c..c502fd7 100644 --- a/s3.tf +++ b/s3.tf @@ -1,5 +1,5 @@ resource "aws_s3_bucket" "one" { - bucket = "Jagadeesh.2024.bucket" + bucket = "jagadeesh.2024.bucket" } resource "aws_s3_bucket_ownership_controls" "two" { From af4e0b15cc05697b750d38907f9553688499baa1 Mon Sep 17 00:00:00 2001 From: Jagadeesh-Bojanapu <132245171+Jagadeesh-Bojanapu@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:03:32 +0530 Subject: [PATCH 4/5] Add S3 backend configuration for Terraform --- s3.tf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/s3.tf b/s3.tf index c502fd7..6ece58d 100644 --- a/s3.tf +++ b/s3.tf @@ -23,4 +23,11 @@ status = "Enabled" } } +terraform { +backend "s3" { +region = "us-east-1" +bucket = "jagadeesh.2024.bucket" +key = "prod/terraform.tfstate" +} +} From 6da7f2d1281e6f8a120680117cce319b7f45fb96 Mon Sep 17 00:00:00 2001 From: Jagadeesh-Bojanapu <132245171+Jagadeesh-Bojanapu@users.noreply.github.com> Date: Mon, 13 Apr 2026 11:14:47 +0530 Subject: [PATCH 5/5] Update SSH private key file in deployment.yml --- ansible/deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/deployment.yml b/ansible/deployment.yml index c391e8e..71a0162 100644 --- a/ansible/deployment.yml +++ b/ansible/deployment.yml @@ -5,7 +5,7 @@ user: ec2-user vars: - ansible_ssh_private_key_file: "/etc/ansible/march-kp.pem" + ansible_ssh_private_key_file: "/etc/ansible/ECR-kp.pem" ansible_ssh_user: "ec2-user" tasks: