Skip to content

Commit ef9ef5d

Browse files
committed
added jenkins inegration with terraform
1 parent d414a9c commit ef9ef5d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pipeline {
2+
agent any
3+
options { timestamps () }
4+
stages{
5+
stage('terraform-Demo') {
6+
steps {
7+
script {
8+
dir("ta-setup")
9+
{
10+
sh './terraform init -upgrade=true -get=true -input=false -force-copy'
11+
sh './terraform workspace new "terraform-demo"'
12+
sh 'echo "INFO: New terraform-demo workspace added."'
13+
sh './terraform workspace select terraform-demo'
14+
sh 'echo "INFO: Terraform -> Planning..."'
15+
sh './terraform plan -out plan_terraform -lock=true'
16+
sh 'echo "INFO: Terraform -> Executing..."'
17+
sh './terraform apply plan_plan_terraform'
18+
}
19+
}
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)