To enable end users to provision and consume cloud resources, platform engineers need to prepare ComponentDefinitions for cloud resources if end users' requirements are beyond the built-in capabilities.
Here is the guide to create Terraform typed ComponentDefinitions of cloud resources for cloud providers Alibaba Cloud, AWS and Azure.
Create a Terraform resource or module for a cloud resource.
For example, we created a Terraform resource for AWS S3 bucket, and stored it in a local file named
We also created a Terraform module for Alibaba Cloud EIP, and stored it in GitHub repository https://github.com/oam-dev/terraform-alibaba-eip.git.
vela def init command, we can generate a ComponentDefinition for a cloud resource based on Terraform resource or module
either from a local file, or from a remote GitHub repository.
--local to accept Terraform resource or module from a local file to generate a ComponentDefinition.
--git to accept Terraform module or resource from a remote GitHub repository to generate a ComponentDefinition.
You are warmly welcome to contribute this extended cloud resource ComponentDefinition to oam-dev/catalog.
Write the generated ComponentDefinition into a file named
terraform-<ComponentDefinition_NAME>.yaml and apply it to the running Kubernetes cluster.
You can quickly verify the ComponentDefinition by command
If the tables display, the ComponentDefinition should work. To take a step further, you can verify it by provision an actual EIP instance per the doc Provision cloud resources.
You are encouraged to generate the documentation for your ComponentDefinition and submit it to KubeVela official site.
vela def doc-gen command, we can generate related docs for the ComponentDefinition either from a local file, or from the running application on kubernetes cluster.
If you choose to generate docs from running cluster, you should provide the name of the ComponentDefinition and the namespace which it is running in.
If you choose to generate docs from local ComponentDefinition file, you should provide the file path.