Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Himanshu branch #105

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a20eaca
labwork
markkerzner Apr 15, 2022
64e5992
Examples
markkerzner Apr 15, 2022
f9f2b26
need to ignore more .terraform
markkerzner Apr 17, 2022
6663cf8
hope better ignore
markkerzner Apr 17, 2022
90740c4
Merge branch 'master' of github.com:elephantscale/terraform-up-and-ru…
markkerzner Apr 17, 2022
ed1baea
README
markkerzner Apr 20, 2022
20ca57a
README
markkerzner Apr 20, 2022
4f09c22
README's
markkerzner Apr 20, 2022
24e5f3a
student environments
markkerzner Apr 20, 2022
b6db495
document TODO
markkerzner Apr 25, 2022
e1dc4c5
more to do
markkerzner Apr 26, 2022
1513738
todo
markkerzner Apr 26, 2022
1234b82
some vars
markkerzner May 30, 2022
5787222
google cloud
markkerzner May 30, 2022
9e875c7
on google
markkerzner May 30, 2022
f66b617
doc
markkerzner May 30, 2022
45b0213
doc
markkerzner May 30, 2022
259fae3
VM in Google
markkerzner May 30, 2022
a6c4fc5
fix for multiple providers: Virginia -> California
markkerzner Jul 7, 2022
f5aadbc
OCI
markkerzner Mar 31, 2023
d1a8a51
added lab 1, 2 and 3
kumarhimanshu449 Apr 18, 2023
50191f7
added labs
kumarhimanshu449 Apr 24, 2023
a84350c
updated lab-01
kumarhimanshu449 May 1, 2023
6010ee5
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 1, 2023
b9c0b70
Merge pull request #1 from elephantscale/himanshu_branch
kumarhimanshu449 May 1, 2023
ec35cab
added lab 03
kumarhimanshu449 May 2, 2023
b4b310c
Merge pull request #2 from elephantscale/himanshu_branch
kumarhimanshu449 May 2, 2023
8bc7b21
updated lab 03
kumarhimanshu449 May 2, 2023
a88c7dc
Merge pull request #3 from elephantscale/himanshu_branch
kumarhimanshu449 May 2, 2023
2924d5f
updated lab 03
kumarhimanshu449 May 2, 2023
80cf9b7
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 2, 2023
a935433
Merge pull request #4 from elephantscale/himanshu_branch
kumarhimanshu449 May 2, 2023
a868c77
added lab 4
kumarhimanshu449 May 3, 2023
555a0e3
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 3, 2023
a0b0ca9
Merge pull request #5 from elephantscale/himanshu_branch
kumarhimanshu449 May 3, 2023
920cc99
updated lab 4
kumarhimanshu449 May 3, 2023
ad7016c
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 3, 2023
120acd4
Merge pull request #6 from elephantscale/himanshu_branch
kumarhimanshu449 May 3, 2023
a101af6
added lab 5
kumarhimanshu449 May 3, 2023
a9693ad
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 3, 2023
0cf809d
Merge pull request #7 from elephantscale/himanshu_branch
kumarhimanshu449 May 3, 2023
96a5a44
added labs
kumarhimanshu449 May 4, 2023
aa705c1
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 4, 2023
b21de1c
Merge pull request #8 from elephantscale/himanshu_branch
kumarhimanshu449 May 4, 2023
946bd4e
updated labs
kumarhimanshu449 May 4, 2023
15b9d04
Merge pull request #9 from elephantscale/himanshu_branch
kumarhimanshu449 May 4, 2023
3d9c202
updated labs
kumarhimanshu449 May 4, 2023
55fca95
Merge pull request #10 from elephantscale/himanshu_branch
kumarhimanshu449 May 4, 2023
c9565fe
added labs
kumarhimanshu449 May 4, 2023
25ee2ad
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 4, 2023
c17c158
Merge pull request #11 from elephantscale/himanshu_branch
kumarhimanshu449 May 4, 2023
0f65a0f
Update main.tf
kumarhimanshu449 May 4, 2023
53b7d27
Update providers.tf
kumarhimanshu449 May 4, 2023
7737319
updated labs
kumarhimanshu449 May 4, 2023
43422bb
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 4, 2023
e4eb83f
Merge pull request #12 from elephantscale/himanshu_branch
kumarhimanshu449 May 4, 2023
dbfc864
added labs
kumarhimanshu449 May 5, 2023
9d55a6b
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 5, 2023
99f53b4
added labs
kumarhimanshu449 May 5, 2023
fc89253
added labs
kumarhimanshu449 May 5, 2023
6f80f6b
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 5, 2023
fbf9c94
Merge pull request #14 from elephantscale/himanshu_branch
kumarhimanshu449 May 5, 2023
faf284f
added labs
kumarhimanshu449 May 5, 2023
9af7eb2
Merge branch 'master' into himanshu_branch
kumarhimanshu449 May 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*.tfstate
*.tfstate.backup
.terraform
*.iml
*.terraform
*.iml
.idea/
*.lock
*.lock.hcl
18 changes: 18 additions & 0 deletions Examples/Module-02 Basics/Example-02-01/code/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Example 02-01

resource "aws_instance" "myVM" {
ami = "ami-077e31c4939f6a2f3"
instance_type = "t2.micro"
tags = {
Name = "Example-01"
}
}

resource "aws_s3_bucket" "myBucket" {
bucket = "terraform-example-02-01"
}

data "aws_vpc" "default_VPC" {
default = true
}
9 changes: 9 additions & 0 deletions Examples/Module-02 Basics/Example-02-01/code/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

output "EC2_public_ip" {
description = "Public IP address of 'myVM"
value = aws_instance.myVM.public_ip
}

output "VPC_id" {
value = data.aws_vpc.default_VPC.id
}
19 changes: 19 additions & 0 deletions Examples/Module-02 Basics/Example-02-01/code/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Example 02-01 - Configuration

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
# Required version of terraform
required_version = ">0.14"
}

provider aws {
region = "us-east-2"
profile = "dev"
}

11 changes: 11 additions & 0 deletions Examples/Module-02 Basics/Example-02-02/code/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# Example 02-02

resource "aws_instance" "myVM" {
ami = var.ami_type
instance_type = var.inst_type
tags = {
Name = "Example-02"
}
}

10 changes: 10 additions & 0 deletions Examples/Module-02 Basics/Example-02-02/code/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

output "EC2_ami" {
description = "ami type used in myVM"
value = aws_instance.myVM.ami
}

output "EC2_type" {
description = "instance type used in myVM"
value = aws_instance.myVM.instance_type
}
17 changes: 17 additions & 0 deletions Examples/Module-02 Basics/Example-02-02/code/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
# Required version of terraform
required_version = ">0.14"
}

provider aws {
region = "us-east-2"
profile = "dev"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inst_type = "t2.nano"
13 changes: 13 additions & 0 deletions Examples/Module-02 Basics/Example-02-02/code/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

variable ami_type {
description = "ami to be used in myVM"
type = string
default = "ami-077e31c4939f6a2f3"

}

variable inst_type {
description = "instance type for myVM"
type = string
}

10 changes: 10 additions & 0 deletions Examples/Module-02 Basics/Example-02-03/code/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Example 02-03

resource "aws_instance" "myVM" {
ami = var.ami_type
instance_type = var.inst_type
tags = {
Name = "Example-03"
}
}
10 changes: 10 additions & 0 deletions Examples/Module-02 Basics/Example-02-03/code/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

output "EC2_ami" {
description = "ami type used in myVM"
value = aws_instance.myVM.ami
}

output "EC2_type" {
description = "instance type used in myVM"
value = "Hi, I am a ${aws_instance.myVM.instance_type} instance type"
}
17 changes: 17 additions & 0 deletions Examples/Module-02 Basics/Example-02-03/code/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
# Required version of terraform
required_version = ">0.14"
}

provider aws {
region = "us-east-2"
profile = "dev"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inst_type = "t2.nano"
13 changes: 13 additions & 0 deletions Examples/Module-02 Basics/Example-02-03/code/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

variable ami_type {
description = "ami to be used in myVM"
type = string
default = "ami-077e31c4939f6a2f3"

}

variable inst_type {
description = "instance type for myVM"
type = string
}

14 changes: 14 additions & 0 deletions Examples/Module-02 Basics/Example-02-04/code/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Example 02-04

locals {
name = "example 04"
}

resource "aws_instance" "myVM" {
ami = var.ami_type
instance_type = var.inst_type
tags = {
Name = local.name
}
}
10 changes: 10 additions & 0 deletions Examples/Module-02 Basics/Example-02-04/code/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

output "EC2_ami" {
description = "ami type used in myVM"
value = aws_instance.myVM.ami
}

output "EC2_type" {
description = "instance type used in myVM"
value = "Hi, I am a ${aws_instance.myVM.instance_type} instance type"
}
17 changes: 17 additions & 0 deletions Examples/Module-02 Basics/Example-02-04/code/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
# Required version of terraform
required_version = ">0.14"
}

provider aws {
region = "us-east-2"
profile = "dev"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inst_type = "t2.nano"
13 changes: 13 additions & 0 deletions Examples/Module-02 Basics/Example-02-04/code/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

variable ami_type {
description = "ami to be used in myVM"
type = string
default = "ami-077e31c4939f6a2f3"

}

variable inst_type {
description = "instance type for myVM"
type = string
}

5 changes: 5 additions & 0 deletions Examples/Module-02 Basics/Example-02-05/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Example-02-05

### New elements
* MYSRT
* Variable of `number` type
23 changes: 23 additions & 0 deletions Examples/Module-02 Basics/Example-02-05/code/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Example 02-05


locals {

message = <<-MYSRT
this is a multi line string
that goes on and one and on
MYSRT

name = "Example 2-5"
}


resource "aws_instance" "myVM" {
ami = var.ami_type
instance_type = var.inst_type
tags = {
Name = local.name

}
}
19 changes: 19 additions & 0 deletions Examples/Module-02 Basics/Example-02-05/code/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

output "EC2_ami" {
description = "ami type used in myVM"
value = aws_instance.myVM.ami
}

output "EC2_type" {
description = "instance type used in myVM"
value = "Hi, I am a ${aws_instance.myVM.instance_type} instance type"
}

output "Message" {
value = local.message
}

output "Port" {
description = "Experiment with a number variable"
value = var.port
}
17 changes: 17 additions & 0 deletions Examples/Module-02 Basics/Example-02-05/code/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
# Required version of terraform
required_version = ">0.14"
}

provider aws {
region = "us-east-2"
profile = "dev"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inst_type = "t2.nano"
20 changes: 20 additions & 0 deletions Examples/Module-02 Basics/Example-02-05/code/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

variable ami_type {
description = "ami to be used in myVM"
type = string
default = "ami-077e31c4939f6a2f3"

}

variable inst_type {
description = "instance type for myVM"
type = string
}

variable port {
description = "port number"
type = number
default = 8080
}


4 changes: 4 additions & 0 deletions Examples/Module-02 Basics/Example-02-06/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Example 02-06

### Reading variables from a file
* See `main.tf`
15 changes: 15 additions & 0 deletions Examples/Module-02 Basics/Example-02-06/code/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

# Example 02-06

locals {
name = file("name.txt")

}

resource "aws_instance" "myVM" {
ami = var.ami_type
instance_type = var.inst_type
tags = {
Name = local.name
}
}
1 change: 1 addition & 0 deletions Examples/Module-02 Basics/Example-02-06/code/name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Example-06
10 changes: 10 additions & 0 deletions Examples/Module-02 Basics/Example-02-06/code/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

output "EC2_ami" {
description = "ami type used in myVM"
value = aws_instance.myVM.ami
}

output "EC2_type" {
description = "instance type used in myVM"
value = "Hi, my name is ${local.name}"
}
19 changes: 19 additions & 0 deletions Examples/Module-02 Basics/Example-02-06/code/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Example 02-02 - Configuration

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
}
# Required version of terraform
required_version = ">0.14"
}

provider aws {
region = "us-east-2"
profile = "dev"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inst_type = "t2.nano"
Loading