version: 1
kind: component
meta:
  name: network

requires:
  - terraform

parameters:
  - name: component.network
    parameters:
      - name: name
        value: default
        env: TF_VAR_name
      - name: autocreateSubnets
        value: true
        env: TF_VAR_autocreate_subnets
      - name: subnetwork.cidr
        env: TF_VAR_cidr
        empty: allow

outputs:
  - name: component.network.subnetwork
    fromTfVar: subnetwork
  - name: component.network.cloudSql.allocatedIpRangeName
    fromTfVar: cloud_sql_allocated_ip_range_name
