From c7db5ac2812329dc1b6eeb9a73ad9414b0511fbe Mon Sep 17 00:00:00 2001 From: ASLAMM123 <68051841+ASLAMM123@users.noreply.github.com> Date: Wed, 24 Mar 2021 14:42:56 +0000 Subject: [PATCH 1/6] new commit new terr commit --- aws-instance-first-script/Jenkinsfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/aws-instance-first-script/Jenkinsfile b/aws-instance-first-script/Jenkinsfile index ddc2dc5..f01fdf9 100644 --- a/aws-instance-first-script/Jenkinsfile +++ b/aws-instance-first-script/Jenkinsfile @@ -30,6 +30,18 @@ pipeline { } } + + + stage('Hello') { + steps { + def tfHome = tool name: 'Terraform', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool' + env.Path = "${tfHome};${env.Path}" + bat 'terraform --version' + echo 'Hello World' + } + } + + stage('Plan') { steps { sh 'pwd;cd terraform/aws-instance-first-script ; terraform init -input=false' From bd7ef3250fb0d556382a1f4720b1a7885c6111f9 Mon Sep 17 00:00:00 2001 From: ASLAMM123 <68051841+ASLAMM123@users.noreply.github.com> Date: Wed, 24 Mar 2021 14:56:44 +0000 Subject: [PATCH 2/6] new ccit sss --- aws-instance-first-script/Jenkinsfile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/aws-instance-first-script/Jenkinsfile b/aws-instance-first-script/Jenkinsfile index f01fdf9..fb865f8 100644 --- a/aws-instance-first-script/Jenkinsfile +++ b/aws-instance-first-script/Jenkinsfile @@ -30,18 +30,7 @@ pipeline { } } - - - stage('Hello') { - steps { - def tfHome = tool name: 'Terraform', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool' - env.Path = "${tfHome};${env.Path}" - bat 'terraform --version' - echo 'Hello World' - } - } - - + stage('Plan') { steps { sh 'pwd;cd terraform/aws-instance-first-script ; terraform init -input=false' From db705d3130d27ac1b9757fdf303d8023de35d74f Mon Sep 17 00:00:00 2001 From: ASLAMM123 <68051841+ASLAMM123@users.noreply.github.com> Date: Wed, 24 Mar 2021 20:01:36 +0000 Subject: [PATCH 3/6] update tag to aws instance update tag to aws instance --- aws-instance-first-script/aws-instance-example.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/aws-instance-first-script/aws-instance-example.tf b/aws-instance-first-script/aws-instance-example.tf index 58ff331..1ea32e7 100644 --- a/aws-instance-first-script/aws-instance-example.tf +++ b/aws-instance-first-script/aws-instance-example.tf @@ -1,4 +1,5 @@ resource "aws_instance" "web1" { ami = "${lookup(var.ami_id, var.region)}" instance_type = "t2.micro" + tags = "new EC2 instance" } From f4031f433da8c7dbed1f2b60f6f8dad5b7aa4ba2 Mon Sep 17 00:00:00 2001 From: ASLAMM123 <68051841+ASLAMM123@users.noreply.github.com> Date: Wed, 24 Mar 2021 20:55:15 +0000 Subject: [PATCH 4/6] tag name ec2 instance tag name ec2 instance --- aws-instance-first-script/aws-instance-example.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws-instance-first-script/aws-instance-example.tf b/aws-instance-first-script/aws-instance-example.tf index 1ea32e7..c16b3dd 100644 --- a/aws-instance-first-script/aws-instance-example.tf +++ b/aws-instance-first-script/aws-instance-example.tf @@ -1,5 +1,7 @@ resource "aws_instance" "web1" { ami = "${lookup(var.ami_id, var.region)}" instance_type = "t2.micro" - tags = "new EC2 instance" - } + tags = { + Name = "new EC2 instance" + } + } From 281f9b841bd35df48dbb00aff4608b1bb9aa3ea5 Mon Sep 17 00:00:00 2001 From: ASLAMM123 <68051841+ASLAMM123@users.noreply.github.com> Date: Wed, 24 Mar 2021 21:18:51 +0000 Subject: [PATCH 5/6] Commit tag5 Commit tag5 --- aws-instance-first-script/aws-instance-example.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws-instance-first-script/aws-instance-example.tf b/aws-instance-first-script/aws-instance-example.tf index c16b3dd..fce1ad9 100644 --- a/aws-instance-first-script/aws-instance-example.tf +++ b/aws-instance-first-script/aws-instance-example.tf @@ -2,6 +2,7 @@ resource "aws_instance" "web1" { ami = "${lookup(var.ami_id, var.region)}" instance_type = "t2.micro" tags = { - Name = "new EC2 instance" + Key : "Name", + Value : "New EC2 Inst" } } From 0ff146c9474968feb064932d4e35f20c193037b8 Mon Sep 17 00:00:00 2001 From: ASLAMM123 <68051841+ASLAMM123@users.noreply.github.com> Date: Wed, 24 Mar 2021 22:00:18 +0000 Subject: [PATCH 6/6] Name tag Name tag --- terraform-variables/terraform-variable-example.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform-variables/terraform-variable-example.tf b/terraform-variables/terraform-variable-example.tf index 6d202fd..6352825 100644 --- a/terraform-variables/terraform-variable-example.tf +++ b/terraform-variables/terraform-variable-example.tf @@ -8,4 +8,5 @@ provider "aws" { resource "aws_instance" "my_web_server" { ami = "${lookup(var.ami_id, var.region)}" instance_type = "t2.micro" + name = "TestEC2" }