天天看点

terraform 配置github module source

terraform 支持多种module 的source 配置

以下是一个简单的使用github source的demo

项目结构

代码说明

使用方法和普通的方式是一样的

get module

效果

init

查看plan

apply

生成的文件

init.sh

terraform module source 对于多种类型的支持还是很不全的,对于我们进行代码的复用还是很方便的

https://www.terraform.io/docs/modules/sources.html

https://github.com/rongfengliang/terraform-module-demo