From c469eb283e162fb7bd7e9089bc3af33c0a4d3e6b Mon Sep 17 00:00:00 2001 From: ponnapalli1997 Date: Fri, 20 Sep 2024 22:59:00 +0530 Subject: [PATCH 1/8] Update main.tf --- main.tf | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/main.tf b/main.tf index c58ced8..6a17868 100644 --- a/main.tf +++ b/main.tf @@ -1,21 +1,21 @@ provider "aws" { -region = "ap-southeast-1" +region = "us-west-1" } resource "aws_instance" "one" { - ami = "ami-06018068a18569ff2" + ami = "ami-047d7c33f6e7b4bc4" instance_type = "t2.micro" - key_name = "rahamabc" + key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] - availability_zone = "ap-southeast-1a" + availability_zone = "us-west-1a" user_data = < /var/www/html/index.html +echo "hai all this is my app created by terraform infrastructurte by akhi of server-1" > /var/www/html/index.html EOF tags = { Name = "web-server-1" @@ -23,18 +23,18 @@ EOF } resource "aws_instance" "two" { - ami = "ami-06018068a18569ff2" + ami = "ami-047d7c33f6e7b4bc4" instance_type = "t2.micro" - key_name = "rahamabc" + key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] - availability_zone = "ap-southeast-1b" + availability_zone = "us-west-1b" user_data = < /var/www/html/index.html +echo "hai all this is my website created by terraform infrastructurte by akhi server-2" > /var/www/html/index.html EOF tags = { Name = "web-server-2" @@ -42,22 +42,22 @@ EOF } resource "aws_instance" "three" { - ami = "ami-06018068a18569ff2" + ami = "ami-047d7c33f6e7b4bc4" instance_type = "t2.micro" - key_name = "rahamabc" + key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] - availability_zone = "ap-southeast-1a" + availability_zone = "us-west-1a" tags = { Name = "app-server-1" } } resource "aws_instance" "four" { - ami = "ami-06018068a18569ff2" + ami = "ami-047d7c33f6e7b4bc4" instance_type = "t2.micro" - key_name = "rahamabc" + key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] - availability_zone = "ap-southeast-1b" + availability_zone = "us-west-1b" tags = { Name = "app-server-2" } @@ -88,7 +88,7 @@ resource "aws_security_group" "five" { } resource "aws_s3_bucket" "six" { - bucket = "devopsbyrahamterraserverbucket9988oo9988" + bucket = "akhiterraserverbucket9988oo9988" } resource "aws_iam_user" "seven" { @@ -103,7 +103,7 @@ default = ["user1", "user2", "user3", "user4"] } resource "aws_ebs_volume" "eight" { - availability_zone = "ap-southeast-1a" + availability_zone = "us-west-1a" size = 40 tags = { Name = "ebs-001" From 53dc6babbcaedec126a80edd160ded05d868f40e Mon Sep 17 00:00:00 2001 From: ponnapalli1997 Date: Fri, 20 Sep 2024 23:00:29 +0530 Subject: [PATCH 2/8] Update elb.tf --- elb.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elb.tf b/elb.tf index 05d661e..1c99f4e 100644 --- a/elb.tf +++ b/elb.tf @@ -1,6 +1,6 @@ resource "aws_elb" "bar" { - name = "raham-terraform-elb" - availability_zones = ["ap-southeast-1a", "ap-southeast-1b"] + name = "akhi-terraform-elb" + availability_zones = ["us-west-1a", "us-west-1b"] listener { instance_port = 80 @@ -21,7 +21,7 @@ resource "aws_elb" "bar" { cross_zone_load_balancing = true idle_timeout = 400 tags = { - Name = "raham-tf-elb" + Name = "akhila-tf-elb" } } From 10d706af78767dfc0b34881894a394d33351d252 Mon Sep 17 00:00:00 2001 From: ponnapalli1997 Date: Sat, 21 Sep 2024 00:12:44 +0530 Subject: [PATCH 3/8] Update main.tf --- main.tf | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/main.tf b/main.tf index 6a17868..06bf8f5 100644 --- a/main.tf +++ b/main.tf @@ -1,14 +1,16 @@ provider "aws" { -region = "us-west-1" +region = "us-east-1" +access_key = "AKIAWFIPS76WMKRACWPY" +secret_key = "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" } resource "aws_instance" "one" { - ami = "ami-047d7c33f6e7b4bc4" + ami = "ami-0ebfd941bbafe70c6" instance_type = "t2.micro" key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] - availability_zone = "us-west-1a" + availability_zone = "us-east-1a" user_data = < Date: Sat, 21 Sep 2024 00:14:20 +0530 Subject: [PATCH 4/8] Update elb.tf --- elb.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elb.tf b/elb.tf index 1c99f4e..2f80352 100644 --- a/elb.tf +++ b/elb.tf @@ -1,6 +1,6 @@ resource "aws_elb" "bar" { name = "akhi-terraform-elb" - availability_zones = ["us-west-1a", "us-west-1b"] + availability_zones = ["us-east-1a", "us-east-1b"] listener { instance_port = 80 @@ -29,7 +29,7 @@ resource "aws_elb" "bar" { cluster_identifier = "aurora-cluster-demo" engine = "aurora-mysql" engine_version = "5.7.mysql_aurora.2.11.2" - availability_zones = ["ap-southeast-1a", "ap-southeast-1b"] + availability_zones = ["us-east-1a", "us-east-1b"] database_name = "mydb" master_username = "raham" master_password = "Rahamshaik#444555" @@ -39,7 +39,7 @@ resource "aws_elb" "bar" { /*resource "aws_instance" "one" { for_each = toset(["one", "two", "three"]) - ami = "ami-006be9ab6a140de6e" + ami = "ami-0ebfd941bbafe70c6" instance_type = "t2.micro" tags = { Name = "instance-${each.key}" From 915ecbd5cff9151a6188734864d03b135bd9be62 Mon Sep 17 00:00:00 2001 From: ponnapalli1997 Date: Sat, 21 Sep 2024 14:12:01 +0530 Subject: [PATCH 5/8] Update main.tf --- main.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.tf b/main.tf index 06bf8f5..9ac7891 100644 --- a/main.tf +++ b/main.tf @@ -1,6 +1,6 @@ provider "aws" { -region = "us-east-1" +region = "us-west-1" access_key = "AKIAWFIPS76WMKRACWPY" secret_key = "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" } @@ -10,7 +10,7 @@ resource "aws_instance" "one" { instance_type = "t2.micro" key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] - availability_zone = "us-east-1a" + availability_zone = "us-west-1a" user_data = < Date: Sat, 21 Sep 2024 14:12:23 +0530 Subject: [PATCH 6/8] Update elb.tf --- elb.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elb.tf b/elb.tf index 2f80352..389f251 100644 --- a/elb.tf +++ b/elb.tf @@ -1,6 +1,6 @@ resource "aws_elb" "bar" { name = "akhi-terraform-elb" - availability_zones = ["us-east-1a", "us-east-1b"] + availability_zones = ["us-west-1a", "us-west-1b"] listener { instance_port = 80 From e88f28605c1c7a6f6b3e0cfe7b789efe7a25a1f7 Mon Sep 17 00:00:00 2001 From: ponnapalli1997 Date: Sat, 21 Sep 2024 15:43:58 +0530 Subject: [PATCH 7/8] Update main.tf --- main.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 9ac7891..17d479e 100644 --- a/main.tf +++ b/main.tf @@ -1,8 +1,7 @@ provider "aws" { region = "us-west-1" -access_key = "AKIAWFIPS76WMKRACWPY" -secret_key = "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" + } resource "aws_instance" "one" { From c10993762b0b7eed4b21976d22f9dbbcde500edf Mon Sep 17 00:00:00 2001 From: ponnapalli1997 Date: Sat, 21 Sep 2024 21:34:15 +0530 Subject: [PATCH 8/8] Update main.tf --- main.tf | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main.tf b/main.tf index 17d479e..324e442 100644 --- a/main.tf +++ b/main.tf @@ -1,11 +1,9 @@ - provider "aws" { -region = "us-west-1" - +region = "us-west-2" } resource "aws_instance" "one" { - ami = "ami-0ebfd941bbafe70c6" + ami = "ami-08d8ac128e0a1b91c" instance_type = "t2.micro" key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] @@ -24,7 +22,7 @@ EOF } resource "aws_instance" "two" { - ami = "ami-0ebfd941bbafe70c6" + ami = "ami-08d8ac128e0a1b91c" instance_type = "t2.micro" key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] @@ -43,7 +41,7 @@ EOF } resource "aws_instance" "three" { - ami = "ami-0ebfd941bbafe70c6" + ami = "ami-08d8ac128e0a1b91c" instance_type = "t2.micro" key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id] @@ -54,7 +52,7 @@ resource "aws_instance" "three" { } resource "aws_instance" "four" { - ami = "ami-0ebfd941bbafe70c6" + ami = "ami-08d8ac128e0a1b91c" instance_type = "t2.micro" key_name = "terraform" vpc_security_group_ids = [aws_security_group.five.id]