將協作帶到HashiCorp Terraform CLI:介紹遠端操作
AUG 16 2018 THE TERRAFORM ENTERPRISE TEAM
HashiCorp Terraform has revolutionized the way that infrastructure is managed by providing a common workflow across providers: write, plan, and apply. Today we're introducing the ability to execute plans remotely in Terraform Enterprise using the Terraform command-line interface (CLI).
As teams collaborate on Terraform code, a few challenges quickly emerge: state storage and synchronization, provider access credential distribution, a history of Terraform plan/applies, and more. Terraform Enterprise has existed for over a year to address these challenges, but it required CLI users to learn a separate web-based workflow.
In Terraform 0.11.8, we're introducing remote operations, beginning with remote plan. Remote operations execute the Terraform code remotely in Terraform Enterprise while CLI behaves exactly as if everything were still local. This solves all the above challenges of working with Terraform without changing the core workflow.
The Remote Backend
Terraform 0.11.8 has a new remote backend that connects local configuration with Terraform Enterprise and enables remote operations.
When using the remote backend, all access credentials, variable values, and state are stored within Terraform Enterprise. No secret material needs to be requested or exist on the user's machine except for a Terraform Enterprise API key, since the secret-accessing parts of Terraform are executed remotely. This simplifies developing infrastructure with Terraform for any configuration to a single API token.
Once you have your API token configured in Terraform's CLI Configuration file, the first step to using remote operations is to configure the backend:
terraform {
backend "remote" {
organization = "my-org"
workspaces {
prefix = "my-app-"
}
}
}
Once you run terraform init
, Terraform will recognize this backend, automatically create Terraform Enterprise Workspaces, and copy the state files from your local Workspaces into Terraform Enterprise.
After this step, all state manipulation commands will operate against the remotely stored state automatically. Commands like terraform taint
and terraform state mv
work just like they do when working locally.
Remote Plan
With the backend configured, the terraform plan
command will automatically trigger a remote plan.
The plan outputs almost identically as if it were run locally, but the entire operation was executed directly in Terraform Enterprise. The plan can also be viewed directly within Terraform Enterprise for users more comfortable with a UI or for sharing with teammates.
Benefits of Remote Operations
Preserving the core workflow: Whether you're using Terraform as an individual or with a team using Terraform Enterprise, the workflow is always the same and can be executed via the CLI: write, plan, apply. Remote plan is a major step towards enabling the core workflow from the CLI that is uniform across all of Terraform.
Securing secrets: With remote plan, access credentials and other secret values only need to exist on the machine executing Terraform. This eliminates the complexity of distributing and securing cloud access credentials to every Terraform user. Instead, each Terraform user only needs a Terraform Enterprise account and API key.
Non-public infrastructure access: Many companies use Terraform to automate providers that aren't publicly accessible, such as VMware vSphere installations. In this scenario, only Terraform Enterprise may have access to the vSphere API. Using remote plans, developer machines can still develop Terraform configurations without access directly to the underlying infrastructure control plane.
History, policy, approvals, and more: Terraform Enterprise provides a number of additional features that are automatically used with remote plans. Terraform Enterprise stores a history of executed plans, requires approval prior to apply, can execute policies to prevent non-compliant infrastructure change, and much more. This happens automatically by running terraform plan
.
Apply
The apply step of the workflow currently still happens in the browser, having been triggered via the UI or the API. An upcoming version of Terraform will support remote terraform apply
from the CLI as well.
Future
Remote plans are available for Terraform Enterprise users in Terraform 0.11.8. Remote applies will be supported in an upcoming Terraform release.
We have designed Terraform Enterprise to provide the best experience for teams collaborating on infrastructure, and we are continuously honing and improving that experience every day. We plan for the full core Terraform workflow to be the same across both open source and enterprise products. We're also introducing access to more enterprise functionality directly from the CLI in future releases.
Terraform 0.11.8 is available for download today. To learn more about remote backends, please read the documentation. To learn more about Terraform Enterprise, please see our page on Terraform Enterprise and request a demo today.
相關文章
- 遠端桌面多開,遠端桌面多開的工具介紹,操作方法
- vnc遠端桌面,4款vnc遠端桌面介紹。VNC
- bbossaop遠端服務介紹-遠端服務呼叫例項
- 遠端管理伺服器軟體,遠端管理伺服器軟體介紹及操作方法伺服器
- mac遠端怎麼操作?蘋果電腦怎麼遠端協助?Mac蘋果
- Terraform 系列-Terraform 簡介ORM
- Azure Terraform(十二)利用 Terraform 將檔案上傳到 Azure Blob StorageORM
- bbossaop遠端服務介紹-遠端服務id定義規則
- 介紹一個.Net遠端日誌元件元件
- 遠端IT運維的升級,“團隊協作”運維
- 遠端訪問的型別使用的協議和身份驗證方法介紹型別協議
- Redis介紹 && Java客戶端操作RedisRedisJava客戶端
- linux下將遠端磁碟mount到本地Linux
- bbossaop遠端服務介紹-體系結構
- rdp遠端桌面介紹,如何利用rdp遠端桌面去連線伺服器?伺服器
- git遠端操作Git
- 團隊協作遠端辦公,有哪些好用的app?APP
- 需要先關閉UAC 然後才能遠端協助操作
- redis-cli 實用功能介紹Redis
- VNC遠端協助軟體,VNC遠端協助軟體下載!VNC
- SDP協議介紹協議
- XMPP協議介紹協議
- Git遠端協作和分支Git
- Shell的遠端協助
- Windows雲伺服器登入 遠端桌面工具介紹Windows伺服器
- Window VNC遠端控制LINUX:VNC詳細配置介紹VNCLinux
- @vue/cli 3.0 實打實的介紹Vue
- 海外開發者分享:我們怎樣利用遠端協作製作超休閒手遊?
- 遠端連線達到最大數量時操作步驟
- QQ遠端協助,不能遠端操作對方WIN7 旗艦版 電腦的系統元件Win7元件
- zoho assist遠端控制--免費兩個月助力協作辦公
- 遠端辦公新方式,Worldviz推出VR協作平臺SkofieldVR
- 三款win7遠端桌面管理工具介紹Win7
- Git 分支操作介紹Git
- 遠端控制的操作流程
- git 遠端分支常用操作Git
- git 遠端操作詳解Git
- rdp(遠端桌面協議)配置協議