天天看點

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

繼續閱讀