A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: Terraform Controller Next

Terraform-ec

Provision Elastic Cloud deployments as KubeVela components through Terraform, with the Elastic Cloud Terraform provider.

Enable the addon​

The addon needs the Terraform addon:

vela addon enable terraform
vela addon enable terraform-ec

Authenticate the provider​

Create the provider's credentials from an Elastic Cloud API key, through a properties file only you can read, so the key isn't saved in your shell history or shown in the process list. After umask 077, create ec-provider.yaml with your editor:

ec-provider.yaml
name: ec
EC_API_KEY: <KEY>

Then create the config from it, and delete the file:

vela config create ec-provider -t terraform-ec -f ec-provider.yaml && rm ec-provider.yaml

name=ec names the Terraform Provider. The addon's elastic-ec-deployment component type uses the Provider ec in the default namespace, so keep that name unless you set providerRef on your components.

Provision a deployment​

Check the component's parameters:

vela show elastic-ec-deployment

Then provision it by creating an Application. To see every Terraform component type installed, run vela components --label type=terraform, or read the cloud resources list.

If no component type covers what you need, write your own: see Extend Cloud Resources.