简体   繁体   English

通过jenkins Job使用Terraform在AWS中自动创建基础架构

[英]Automate creating infrastructure in AWS using Terraform through jenkins Job

I'm trying to automate creating infrastructure in AWS using Terraform through jenkins Job. 我正在尝试通过jenkins Job使用Terraform在AWS中自动创建基础架构。

Below are the steps 以下是步骤

1.I have installed Jenkins on AWS Linux EC2 instance 1.我已经在AWS Linux EC2实例上安装了Jenkins

  1. I have installed terraform plugin in jenkins as shown below under Manage jenkis/Manage Plugins 我已经在jenkins中安装了terraform插件,如下所示在Manage jenkis / Manage Plugins下 在此处输入图片说明 and under Manage jenkis/Global Tool COnfiguration made the below change 并在Manage jenkis / Global Tool配置下进行了以下更改 在此处输入图片说明 3.create a new jenkins job with the below configuration 3.使用以下配置创建一个新的詹金斯工作 在此处输入图片说明 4.I'm getting the below errors while running the job 4.我在执行作业时遇到以下错误 在此处输入图片说明 在此处输入图片说明

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 按照以下注释中的建议添加了aws版本,以下是jenkins的控制台输出

在此处输入图片说明

You need define the release version for terraform provider aws , example: 您需要为terraform provider aws定义发行版本,例如:

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

Reference: 参考:

Provider Versions 提供者版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用带有Jenkins的AWS Codepipeline自动化软件 - How to automate software using AWS codepipeline with jenkins 使用 terraform 创建 aws codedeploy ecs 基础设施 - use terraform to create an aws codedeploy ecs infrastructure 如何将 Terraform 状态与我的 AWS 基础设施同步 - How to sync Terraform state with my AWS infrastructure 如何使用Terraform自动化一次性AWS资源? - How to automate one-off AWS resources using Terraform? 通过 jenkins 部署到 AWS 时出现 Terraform 版本错误? - Terraform version error when deploying to AWS through jenkins? Github 操作恢复/销毁 terraform Terraform 计划创建的 AWS 基础设施 - Github Actions revert/destroy terraform AWS infrastructure created by Terraform Plan 使用 terraform 创建 aws 路由表的问题 - Problems in creating aws route table using terraform 如何使用 terraform 在本地区域配置基础设施? - How to provision infrastructure in a local zone using terraform? 如何在 aws_batch_job_definition 中使用 terraform 定义 ephemeralStorage? - How to define ephemeralStorage using terraform in a aws_batch_job_definition? terraform 基础设施在本地运行,在 aws 代码管道上构建和部署它会出错 - terraform infrastructure runs locally , building and deploying it on aws codepipeline gives error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM