github.com/oam-dev/kubevela@v1.9.11/references/docgen/testdata/terraform-tencent-subnet.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: ComponentDefinition
     3  metadata:
     4    annotations:
     5      definition.oam.dev/description: Tencent Cloud Subnet
     6    creationTimestamp: null
     7    labels:
     8      type: terraform
     9    name: tencent-subnet
    10    namespace: vela-system
    11  spec:
    12    schematic:
    13      terraform:
    14        configuration: |
    15          terraform {
    16            required_providers {
    17              tencentcloud = {
    18                source = "tencentcloudstack/tencentcloud"
    19              }
    20            }
    21          }
    22  
    23          variable "availability_zone" {
    24            description = "Availability Zone"
    25            default = "ap-beijing-1"
    26            type = string
    27          }
    28  
    29          resource "tencentcloud_vpc" "foo" {
    30            name       = "guagua-ci-temp-test"
    31            cidr_block = "10.0.0.0/16"
    32          }
    33  
    34          resource "tencentcloud_subnet" "subnet" {
    35            availability_zone = var.availability_zone
    36            name              = var.name
    37            vpc_id            = tencentcloud_vpc.foo.id
    38            cidr_block        = var.cidr_block
    39            is_multicast      = var.is_multicast
    40          }
    41  
    42          variable "name" {
    43            description = "Subnet name"
    44            default = "guagua-ci-temp-test"
    45            type = string
    46          }
    47  
    48          variable "cidr_block" {
    49            description = "Subnet CIDR block"
    50            default = "10.0.20.0/28"
    51            type = string
    52          }
    53  
    54          variable "is_multicast" {
    55            description = "Subnet is multicast"
    56            default = false
    57            type = bool
    58          }
    59  
    60          output "SUBNET_ID" {
    61            description = "Subnet ID"
    62            value = tencentcloud_subnet.subnet.id
    63          }
    64        providerRef:
    65          name: tencent
    66          namespace: default
    67    workload:
    68      definition:
    69        apiVersion: terraform.core.oam.dev/v1beta1
    70        kind: Configuration
    71  status: {}