# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
 values:
  google_alloydb_cluster.default:
    cluster_id: alloydb-cluster-all
    display_name: alloydb-cluster-all
    encryption_config: []
    initial_user:
    - password: alloydb-cluster-password
      user: alloydb-cluster-full
    labels: null
    location: europe-west2
    network: projects/myproject/global/networks/default
    project: myproject
    timeouts: null
  google_alloydb_instance.primary:
    annotations: null
    database_flags: null
    display_name: alloydb-primary-instance
    gce_zone: null
    instance_id: primary-instance-1
    instance_type: PRIMARY
    labels: null
    machine_config:
    - cpu_count: 2
    read_pool_config: []
    timeouts: null
  google_alloydb_instance.read_pool["read-instance-1"]:
    annotations: null
    database_flags: null
    display_name: null
    gce_zone: null
    instance_id: read-instance-1
    instance_type: READ_POOL
    labels: null
    machine_config:
    - cpu_count: 1
    read_pool_config:
    - node_count: 1
    timeouts: null
  google_alloydb_instance.read_pool["read-instance-2"]:
    annotations: null
    database_flags: null
    display_name: null
    gce_zone: null
    instance_id: read-instance-2
    instance_type: READ_POOL
    labels: null
    machine_config:
    - cpu_count: 1
    read_pool_config:
    - node_count: 1
    timeouts: null
  google_compute_global_address.private_ip_alloc:
    address_type: INTERNAL
    description: null
    ip_version: null
    name: adb-all
    prefix_length: 16
    purpose: VPC_PEERING
    timeouts: null
  google_compute_network.default:
    auto_create_subnetworks: true
    delete_default_routes_on_create: false
    description: null
    enable_ula_internal_ipv6: null
    name: multiple-readpool
    network_firewall_policy_enforcement_order: AFTER_CLASSIC_FIREWALL
    timeouts: null
  google_service_networking_connection.vpc_connection:
    reserved_peering_ranges:
    - adb-all
    service: servicenetworking.googleapis.com
    timeouts: null

counts:
  google_alloydb_cluster: 1
  google_alloydb_instance: 3
  google_compute_global_address: 1
  google_compute_network: 1
  google_service_networking_connection: 1
  modules: 0
  resources: 7

outputs:
  cluster: alloydb-cluster-all
  cluster_id: alloydb-cluster-all
  primary_instance: alloydb-primary-instance
  primary_instance_id: primary-instance-1
  read_pool_instance_ids:
  - read-instance-1
  - read-instance-2
