首页 > 解决方案 > terraform 应用字符串模板而不是模板文件

问题描述

在 python 脚本terraform apply中可以按如下方式运行:

from python_terraform import *
...

tf = Terraform(TERRAFORM_DIR)
return_code, stdout, stderr = tf.apply(capture_output=True, skip_plan=True)

有没有办法terraform apply使用像 AWS cloudformation(例如 TemplateBody= some_string)这样的字符串模板在其中运行?

标签: pythonamazon-web-servicescloudterraform

解决方案


推荐阅读