PageSourceSearch

https://kubevela.io/assets/js/641ed802.713931d3.js

js kubevela.io collected 2026-10-02 03:37:34 UTC 5,826 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkkubevela_io=self.webpackChunkkubevela_io||[]).push([[5145],{5454:(e,r,o)=>{o.r(r),o.d(r,{assets:()=>s,contentTitle:()=>d,default:()=>u,frontMatter:()=>l,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"reference/addons/terraform","title":"Terraform","description":"To provision cloud resources, you can use terraform along with related cloud provider addons.","source":"@site/docs/reference/addons/terraform.md","sourceDirName":"reference/addons","slug":"/reference/addons/terraform","permalink":"/docs/next/reference/addons/terraform","draft":false,"unlisted":false,"editUrl":"https://github.com/kubevela/kubevela.io/edit/main/docs/reference/addons/terraform.md","tags":[],"version":"current","lastUpdatedBy":"sreejith-rajashekaran","lastUpdatedAt":1748601525000,"frontMatter":{"title":"Terraform"},"sidebar":"docs","previous":{"title":"FluxCD","permalink":"/docs/next/reference/addons/fluxcd"},"next":{"title":"Cloud Resources orchestrated by Crossplane","permalink":"/docs/next/reference/addons/crossplane"}}');var n=o(74848),t=o(28453);const l={title:"Terraform"},d=void 0,s={},c=[{value:"Enable Terraform addon",id:"enable-terraform-addon",level:2},{value:"Enable Terraform Provider addon",id:"enable-terraform-provider-addon",level:2},{value:"Authenticate a Terraform provider",id:"authenticate-a-terraform-provider",level:3},{value:"Provision cloud resources",id:"provision-cloud-resources",level:3}];function i(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.p,{children:"To provision cloud resources, you can use terraform along with related cloud provider addons."}),"\n",(0,n.jsx)(r.h2,{id:"enable-terraform-addon",children:"Enable Terraform addon"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-shell",children:"vela addon enable terraform\n"})}),"\n",(0,n.jsx)(r.p,{children:"After Terraform addon is enabled, you will have a basic capability to create cloud resources in CRD ways. Then you can enable a terraform provider addon for specific clouds."}),"\n",(0,n.jsx)(r.h2,{id:"enable-terraform-provider-addon",children:"Enable Terraform Provider addon"}),"\n",(0,n.jsx)(r.p,{children:"KubeVela can support the following cloud providers by enabling the Terraform provider addons."}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-shell",children:"$ vela addon list | grep terraform-\n"})}),"\n",(0,n.jsx)(r.p,{children:"The output would look like the below:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-shell",children:"terraform-alibaba        \tKubeVela\tKubernetes Terraform Controller for Alibaba Cloud                                                    \t[1.0.2, 1.0.1]                      \tenabled (1.0.2)\nterraform-tencent        \tKubeVela\tKubernetes Terraform Controller Provider for Tencent Cloud                                           \t[1.0.0, 1.0.1]                      \tenabled (1.0.0)\nterraform-aws            \tKubeVela\tKubernetes Terraform Controller for AWS                                                              \t[1.0.0, 1.0.1]                      \tenabled (1.0.0)\nterraform-azure          \tKubeVela\tKubernetes Terraform Controller for Azure                                                            \t[1.0.0, 1.0.1]                      \tenabled (1.0.0)\nterraform-baidu          \tKubeVela\tKubernetes Terraform Controller Provider for Baidu Cloud                                             \t[1.0.0, 1.0.1]                      \tenabled (1.0.0)\nterraform-gcp            \tKubeVela\tKubernetes Terraform Controller Provider for Google Cloud Platform                                   \t[1.0.0, 1.0.1]                      \tenabled (1.0.0)\nterraform-ucloud         \tKubeVela\tKubernetes Terraform Controller Provider for UCloud                                                  \t[1.0.1, 1.0.0]                      \tenabled (1.0.1)\n"})}),"\n",(0,n.jsx)(r.p,{children:"To enable one of them, use the following command:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-shell",children:"vela addon enable terraform-<provider-name>\n"})}),"\n",(0,n.jsxs)(r.p,{children:["You can also disable, upgrade, and check the status of an addon by command ",(0,n.jsx)(r.code,{children:"vela addon"}),"."]}),"\n",(0,n.jsx)(r.h3,{id:"authenticate-a-terraform-provider",children:"Authenticate a Terraform provider"}),"\n",(0,n.jsx)(r.p,{children:"View the supported Terraform providers."}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-shell",children:"vela config-template list | grep terraform\n"})}),"\n",(0,n.jsx)(r.p,{children:"For example to create a provider config for AWS."}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-shell",children:"vela config create aws -t terraform-aws AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=yyy AWS_DEFAULT_REGION=us-east-1\n"})}),"\n",(0,n.jsx)(r.h3,{id:"provision-cloud-resources",children:"Provision cloud resources"}),"\n",(0,n.jsxs)(r.p,{children:["After a Terraform provider is authenticated, you can ",(0,n.jsx)(r.a,{href:"/docs/next/tutorials/consume-cloud-services",children:"provision and/
1or consume cloud resources"}),"."]})]})}function u(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(i,{...e})}):i(e)}},28453:(e,r,o)=>{o.d(r,{R:()=>l,x:()=>d});var a=o(96540);const n={},t=a.createContext(n);function l(e){const r=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),a.createElement(t.Provider,{value:r},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.