简体   繁体   中英

Automate creating infrastructure in AWS using Terraform through jenkins Job

I'm trying to automate creating infrastructure in AWS using Terraform through jenkins Job.

Below are the steps

1.I have installed Jenkins on AWS Linux EC2 instance

  1. I have installed terraform plugin in jenkins as shown below under Manage jenkis/Manage Plugins 在此处输入图片说明 and under Manage jenkis/Global Tool COnfiguration made the below change 在此处输入图片说明 3.create a new jenkins job with the below configuration 在此处输入图片说明 4.I'm getting the below errors while running the job 在此处输入图片说明 在此处输入图片说明

Appreciate your help to find the fix

Added the aws version as suggested in the below comments and below is the console output from jenkins

在此处输入图片说明

You need define the release version for terraform provider aws , example:

provider "aws" {
  version = "~> 1.0"
  ..
}

Reference:

Provider Versions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM