Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Day-3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ provider "aws" {
module "ec2_instance" {
source = "./modules/ec2_instance"
ami_value = "ami-053b0d53c279acc90" # replace this
instance_type_value = "t2.micro"
subnet_id_value = "subnet-019ea91ed9b5252e7". # replace this
}


}
4 changes: 2 additions & 2 deletions Day-3/modules/ec2_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ provider "aws" {
resource "aws_instance" "example" {
ami = var.ami_value
instance_type = var.instance_type_value
subnet_id = var.subnet_id_value
}

}
4 changes: 0 additions & 4 deletions Day-3/modules/ec2_instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ variable "ami_value" {
variable "instance_type_value" {
description = "value for instance_type"
}

variable "subnet_id_value" {
description = "value for the subnet_id"
}
6 changes: 3 additions & 3 deletions Day-4/backend.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
terraform {
backend "s3" {
bucket = "abhishek-s3-demo-xyz" # change this
key = "abhi/terraform.tfstate"
bucket = "neha-s3-demo-xyz" # change this
key = "neha/terraform.tfstate"
region = "us-east-1"
encrypt = true
dynamodb_table = "terraform-lock"
}
}
}
6 changes: 3 additions & 3 deletions Day-4/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ provider "aws" {
resource "aws_instance" "abhishek" {
instance_type = "t2.micro"
ami = "ami-053b0d53c279acc90" # change this
subnet_id = "subnet-019ea91ed9b5252e7" # change this

}

resource "aws_s3_bucket" "s3_bucket" {
bucket = "abhishek-s3-demo-xyz" # change this
bucket = "neha-s3-demo-xyz" # change this
}

resource "aws_dynamodb_table" "terraform_lock" {
Expand All @@ -21,4 +21,4 @@ resource "aws_dynamodb_table" "terraform_lock" {
name = "LockID"
type = "S"
}
}
}