1

I've been using Terratest to test all my go modules and absolutely love it as a means for running terraform and interacting with terraform infrastructure through the go programming language. However, terratest is designed to be integrated with the go test framework, not as a Go application of its own, which would be my goal.

Doing a quick search to find terraform go libraries I found Terranova does this, but is outdated. Is there a go library that someone has created currently that's similar to Terratest? Or is there a good way to run terraform as a go library instead of as a wrapper for the commands?

4

1 回答 1

2

有一个 HashiCorp 库,用于从名为terraform-exec的 Go 程序运行 Terraform 。

但是,此库是运行 Terraform CLI 的包装器,因为这是以编程方式与 Terraform 集成的唯一受支持的方式。Terraform CLI 是一个应用程序,而不是一个库。

于 2021-05-25T22:33:06.427 回答