英文:
Using hashicorp container with cloudbuild
问题
以下是已翻译的内容:
"所有的cloudbuild文档都引用了使用由GCP托管的Cloud builders(公开可用的容器映像)。我需要运行一个terraform构建,并已成功在我的cloudbuild配置文件中使用了一个terraform发布的容器映像:"
"这是否是正确的方法,还是应该创建自己的terraform容器映像,如下所示并使用它?我不明白当已经存在一个'builder'时拥有自己的'builder'的价值是什么..."
"链接:https://github.com/GoogleCloudPlatform/cloud-builders-community/blob/master/terraform/cloudbuild.yaml"
英文:
All of the cloudbuild documentation references using Cloud builders (publicly available container images) that are hosted by GCP. I need to run a terraform build and have successfully used a terraform published container image in my cloudbuild configuration file:
steps:
- name: 'hashicorp/terraform:latest'
Is this the right approach or should creating my own terraform container image as shown below and using that? I'm not understanding what the value is of having my own 'builder' when one already exists...
https://github.com/GoogleCloudPlatform/cloud-builders-community/blob/master/terraform/cloudbuild.yaml
答案1
得分: 0
在Cloud Build中运行Terraform构建最好使用hashicorp/terraform:latest
容器镜像。它提供了Terraform的最新版本,因为它已经被开发并得到维护。
如果默认镜像不符合您的特殊需求或自定义要求,创建您自己的容器镜像可能会有所帮助。这样可以更多地控制构建环境,但需要更多的维护工作。
对于大多数使用情况来说,默认的Terraform镜像应该足够了。
英文:
Running Terraform builds in Cloud Build is best done using the hashicorp/terraform:latest
container image. It offers the most recent version of Terraform because it has already been developed and is being maintained.
If the default image does not meet your special needs or customizations, creating your own container image can be helpful. More control over the build environment is possible, but more upkeep is necessary.
For the majority of use situations, the default Terraform image ought to be adequate.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论