[英]Where can I run terraform?
This is mostly a research question as I can't seem to find out where I can run Terraform for my use case.这主要是一个研究问题,因为我似乎无法找到在哪里可以为我的用例运行 Terraform。
I want to build a web front end which I can enter details for configuration, click a button and the front end would tell Terraform to build the infrastructure.我想构建一个 web 前端,我可以输入详细信息进行配置,单击一个按钮,前端会告诉 Terraform 构建基础设施。 I understand I can use the cli, or create a.tf file and then use Jenkins to run it.我知道我可以使用 cli,或创建一个.tf 文件,然后使用 Jenkins 来运行它。 But I'm looking for a way to basically call the Terraform cli commands through events like a lambda call.但我正在寻找一种方法,通过 lambda 调用等事件基本上调用 Terraform cli 命令。
Should I use cloud provider sdks for this?我应该为此使用云提供商 sdks 吗?
Has anyone gone about doing something like this and if so, could you share your experiences?有没有人做过这样的事情,如果有,你能分享你的经验吗?
I think I found something really useful! 我想我发现了一些非常有用的东西!
Lambda Terraform Call using Python 使用Python进行Lambda Terraform调用
This would be what I had in mind, generate a Terraform plan file, drop into an S3 bucket, then invoke the lambda call to spin up the infrastructure. 这就是我的想法,生成一个Terraform计划文件,放入一个S3存储桶,然后调用lambda调用来启动基础设施。 And all can be done with the front end configuration setting and an API call. 所有这些都可以通过前端配置设置和API调用完成。
I hope this comes in handy for some other people and once I have it working I might come back and add to this. 我希望这对其他人来说很方便,一旦我开始工作,我可能会回来加入这个。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.