简体   繁体   中英

Terraform: Write a CloudFormation Template to disk

We are using Terraform along with a vendor supplied CloudFormation template. It is all working except for when there are changes to the template. Terraform does not show you what will change as it's all contained within the template. I was wondering if Terraform could write out the rendered CloudFormation template to disk where we could (in theory) use AWS native CloudFormation to create a change set to attempt to see the changes. Any ideas if Terraform can write this out?

Terraform works by abstracting different infrastructure types into providers . In the case of AWS, the AWS Provider interprets your Terraform config into a set of AWS API calls. It does not internally create any CloudFormation templates, and has no understanding of or mapping to CloudFormation.

If you really want to use Terraform to describe changes made via CloudFormation you will likely have to create your own tool to convert CF templates into Terraform Variable files . As each new variable file is generated, you could run terraform plan to see what the outcome would be.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM