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

apiVersion: blueprints.cloud.google.com/v1alpha1
kind: BlueprintMetadata
metadata:
  name: terraform-google-analytics-lakehouse
  annotations:
    config.kubernetes.io/local-config: "true"
spec:
  info:
    title: terraform-google-lakehouse
    source:
      repo: https://github.com/GoogleCloudPlatform/terraform-google-analytics-lakehouse.git
      sourceType: git
    version: 0.4.0
    actuationTool:
      flavor: Terraform
      version: ">= 0.13"
    description: {}
  content:
    documentation:
      - title: Create an Analytics Lakehouse
        url: https://cloud.google.com/architecture/big-data-analytics/analytics-lakehouse
    examples:
      - name: analytics_lakehouse
        location: examples/analytics_lakehouse
  interfaces:
    variables:
      - name: enable_apis
        description: Whether or not to enable underlying apis in this solution. .
        varType: string
        defaultValue: true
      - name: force_destroy
        description: Whether or not to protect GCS resources from deletion when solution is modified or changed.
        varType: string
        defaultValue: false
      - name: labels
        description: A map of labels to apply to contained resources.
        varType: map(string)
        defaultValue:
          analytics-lakehouse: true
      - name: project_id
        description: Google Cloud Project ID
        varType: string
        required: true
      - name: public_data_bucket
        description: Public Data bucket for access
        varType: string
        defaultValue: data-analytics-demos
      - name: region
        description: Google Cloud Region
        varType: string
        defaultValue: us-central1
      - name: use_case_short
        description: Short name for use case
        varType: string
        defaultValue: lakehouse
    outputs:
      - name: bigquery_editor_url
        description: The URL to launch the BigQuery editor
      - name: lakehouse_colab_url
        description: The URL to launch the in-console tutorial for the Analytics Lakehouse solution
      - name: lookerstudio_report_url
        description: The URL to create a new Looker Studio report displays a sample dashboard for data analysis
      - name: neos_tutorial_url
        description: The URL to launch the in-console tutorial for the Analytics Lakehouse solution
      - name: workflow_return_project_setup
        description: Output of the project setup workflow
  requirements:
    roles:
      - level: Project
        roles:
          - roles/owner
          - roles/bigquery.dataViewer
    services:
      - cloudkms.googleapis.com
      - cloudresourcemanager.googleapis.com
      - bigquery.googleapis.com
      - bigquerystorage.googleapis.com
      - bigqueryconnection.googleapis.com
      - serviceusage.googleapis.com
      - iam.googleapis.com
