Loading

随笔分类 -  Teffaform

摘要:变量 (var) 为了使代码更DRY化和可配置化,terraform允许用户定义输入变量。 输入变量、输出变量 变量语法 varible "NAME" { [CONFIG ...] } 变量声明包含3个参数: description 描述参数用来说明如何使用这个变量 default 有多种方法可以为 阅读全文
posted @ 2021-03-25 15:59 宋某人 阅读(771) 评论(0) 推荐(0) 编辑
摘要:代码如下: provider "aws" { profile = "default" region = "ap-east-1" } resource "aws_instance" "example" { ami = "ami-0e5c29e6c87a9644f" instance_type = "t 阅读全文
posted @ 2021-03-12 19:20 宋某人 阅读(478) 评论(0) 推荐(0) 编辑
摘要:Error: Error launching source instance: Unsupported: The requested configuration is currently not supported. Please check the documentation for suppor 阅读全文
posted @ 2021-03-12 19:14 宋某人 阅读(213) 评论(0) 推荐(0) 编辑
摘要:main.tf terraform { required_providers { docker = { source = "kreuzwerker/docker" } } } provider "docker" {} resource "docker_image" "nginx" { name = 阅读全文
posted @ 2021-02-24 11:53 宋某人 阅读(394) 评论(0) 推荐(0) 编辑
摘要:L1、基础架构即代码 L2、服务资源即代码 阅读全文
posted @ 2021-01-26 19:01 宋某人 阅读(502) 评论(0) 推荐(0) 编辑
摘要:使用terraform的第一步是配置要使用的提供商创建一个空文件夹,并在其中创建名为main.tf的文件,文件内容如下 provider "aws" { profile = "default" region = "ap-northeast-1" } 表示: 1、此配置告诉terraform 将使用A 阅读全文
posted @ 2020-07-21 16:28 宋某人 阅读(737) 评论(0) 推荐(0) 编辑
摘要:根据provider选择相应的插件进行下载 https://releases.hashicorp.com/ AWS 初始化 ➜ aws pwd /opt/terraform/plugins/aws ➜ aws ls terraform-provider-aws_2.70.0_darwin_amd64 阅读全文
posted @ 2020-07-21 16:15 宋某人 阅读(1067) 评论(0) 推荐(0) 编辑
摘要:##官方下载页面 https://www.terraform.io/downloads.html Windows安装步骤 在Windows上,它至少包含C:\Windows和C:\Windows\system32目录 右击我的电脑-属性-高级系统设置-环境变量-系统变量-Path-编辑-新建 lin 阅读全文
posted @ 2020-01-13 20:42 宋某人 阅读(1118) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示