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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Terraform specific ignore files
.terraform/
*.tfstate
*.tfstate.*
*.tfstate.backup
.terraform.lock.hcl
.terraform/modules/
.terraform/plugins/
2 changes: 1 addition & 1 deletion createuser/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ provider "aws" {
}

resource "aws_iam_user" "lb" {
name = "Adam"
name = "cloud-user"
}
10 changes: 10 additions & 0 deletions dynamodb/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aws_dynamodb_table" "demo-table" {
name = "demo-table"
billing_mode = "PAY_PER_REQUEST"
hash_key = "id"

attribute {
name = "id"
type = "S"
}
}
8 changes: 4 additions & 4 deletions eks/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
provider "aws" {
region = "us-east-1"
region = "ap-south-1"
}

# Create VPC
Expand All @@ -11,13 +11,13 @@ resource "aws_vpc" "eks_vpc" {
resource "aws_subnet" "eks_subnet_a" {
vpc_id = aws_vpc.eks_vpc.id
cidr_block = "10.0.1.0/24"
availability_zone = "us-east-1a"
availability_zone = "ap-south-1a"
}

resource "aws_subnet" "eks_subnet_b" {
vpc_id = aws_vpc.eks_vpc.id
cidr_block = "10.0.2.0/24"
availability_zone = "us-east-1b"
availability_zone = "ap-south-1b"
}

# Create IAM Role for EKS Cluster
Expand All @@ -44,7 +44,7 @@ resource "aws_iam_role_policy_attachment" "eks_cluster_policy" {

# Create EKS Cluster
resource "aws_eks_cluster" "example" {
name = "my-eks-cluster"
name = "terraform-cluster"
role_arn = aws_iam_role.eks_cluster_role.arn

vpc_config {
Expand Down
11 changes: 11 additions & 0 deletions rds/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "aws_db_instance" "default" {
allocated_storage = 10
db_name = "mydb"
engine = "mysql"
engine_version = "8.0"
instance_class = "db.t3.micro"
username = "foo"
password = "foobarbaz"
parameter_group_name = "default.mysql8.0"
skip_final_snapshot = true
}
2 changes: 1 addition & 1 deletion s3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ provider "aws" {
}

resource "aws_s3_bucket" "b" {
bucket = "batch25terraformbucket"
bucket = "birju-bucket0409"
}
2 changes: 1 addition & 1 deletion vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.27"
version = "~> 6.0.0"
}
}

Expand Down