# Copyright 2025 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.

sources:
  alloydb-admin-source:
    kind: alloydb-admin
    defaultProject: ${ALLOYDB_POSTGRES_PROJECT:}
tools:
  create_cluster:
    kind: alloydb-create-cluster
    source: alloydb-admin-source
  wait_for_operation:
    kind: alloydb-wait-for-operation
    source: alloydb-admin-source
    delay: 1s
    maxDelay: 4m
    multiplier: 2
    maxRetries: 10
  create_instance:
    kind: alloydb-create-instance
    source: alloydb-admin-source
  list_clusters:
    kind: alloydb-list-clusters
    source: alloydb-admin-source
  list_instances:
    kind: alloydb-list-instances
    source: alloydb-admin-source
  list_users:
    kind: alloydb-list-users
    source: alloydb-admin-source
  create_user:
    kind: alloydb-create-user
    source: alloydb-admin-source
  get_cluster:
    kind: alloydb-get-cluster
    source: alloydb-admin-source
  get_instance:
    kind: alloydb-get-instance
    source: alloydb-admin-source
  get_user:
    kind: alloydb-get-user
    source: alloydb-admin-source
        
toolsets:
  alloydb_postgres_admin_tools:
    - create_cluster
    - wait_for_operation
    - create_instance
    - list_clusters
    - list_instances
    - list_users
    - create_user
    - get_cluster
    - get_instance
    - get_user
