github.com/oam-dev/kubevela@v1.9.11/references/docgen/testdata/terraform-baidu-vpc.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: ComponentDefinition 3 metadata: 4 annotations: 5 definition.oam.dev/description: Baidu Cloud VPC 6 creationTimestamp: null 7 labels: 8 type: terraform 9 name: baidu-vpc 10 namespace: vela-system 11 spec: 12 schematic: 13 terraform: 14 configuration: |- 15 terraform { 16 required_providers { 17 baiducloud = { 18 source = "baidubce/baiducloud" 19 version = "1.12.0" 20 } 21 } 22 } 23 24 resource "baiducloud_vpc" "default" { 25 name = var.name 26 description = var.description 27 cidr = var.cidr 28 } 29 30 variable "name" { 31 default = "terraform-vpc" 32 description = "The name of the VPC" 33 type = string 34 } 35 36 variable "description" { 37 description = "The description of the VPC" 38 default = "this is created by terraform" 39 type = string 40 } 41 42 variable "cidr" { 43 description = "The CIDR of the VPC" 44 default = "192.168.0.0/24" 45 type = string 46 } 47 48 output "vpcs" { 49 value = baiducloud_vpc.default.id 50 } 51 providerRef: 52 name: baidu 53 namespace: default 54 workload: 55 definition: 56 apiVersion: terraform.core.oam.dev/v1beta1 57 kind: Configuration 58 status: {}