Extend a Terraform Addon
Terraform Controller is the core controller to provision and manage cloud resources for KubeVela. It has supported some cloud providers, including AWS, Azure, GCP, Alibaba Cloud, Tencent Cloud, etc. But only a few has been supported as Terraform Addons in KubeVela.
This guide will show you how to extend a Terraform Addon to support your cloud provider.
#
Choose a Cloud ProviderIf the cloud provider you want to support is none of supported cloud providers in Terraform Controller, you have to support it first. If it has been supported by Terraform Controller, you can continue to extend the addon.
#
Prepare metadata for the Cloud Provider- Clone oam-dev/catalog
- Prepare a metadata file
Edit the metadata file hack/addons/terraform/terraform-provider-scaffold/metadata.yaml
for your cloud provider.
#
Generate a Terraform AddonGenerate a Terraform Addon for your cloud provider. The generated addon code will be stored in addons/terraform-tencent
.
#
Verify the Terraform AddonEnable the addon Check whether a Provider
is created whose name is the same as your cloud provider.
You are encouraged to further verify the provider by provision a cloud resource of your cloud provider.
#
Submit the Terraform AddonPush the code generated in ./addons
and make a pull request.
#
Contribute documentationWrite Terraform Addon enable doc for your cloud provider and add it to all supported cloud providers.