资源编排服务 RFS-VPC.Subnet:blueprint样例

时间:2024-04-18 10:02:52

blueprint样例

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  vpc-name:
    default: vpc
    type: string
  vpc-cidr:
    default: 192.168.0.0/16
    type: string
  subnet-name:
    type: string
    default: subnet
  subnet-cidr:
    default: 192.168.0.0/24
    type: string
  subnet-gateway:
    type: ip
    default: 192.168.0.1
  dhcenable:
    type: boolean
    default: true
  availabilityZone:
    description: 子网所在的可用区名称
    label: ''
node_templates:
  my-vpc:
    type: HuaweiCloud.VPC.VPC
    properties:
      name:
        get_input: vpc-name
      cidr:
        get_input: vpc-cidr
  my-subnet:
    type: HuaweiCloud.VPC.Subnet
    properties:
      name:
        get_input: subnet-name
      cidr:
        get_input: subnet-cidr
      gateway:
        get_input: subnet-gateway
      dhcpEnable:
        get_input: dhcenable
      dnsList: [114.114.114.115,114.114.114.114]
      vpcId:
        get_attribute: [my-vpc,refID] 
      availabilityZone:
        get_input: availabilityZone
    requirements:
      - vpcId:
          node: my-vpc
          relationship: HuaweiCloud.Relationships.ContainedIn
support.huaweicloud.com/tr-aos/vpc-subnet.html