# 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-ecommerce-microservices-on-gke
  annotations:
    config.kubernetes.io/local-config: "true"
spec:
  info:
    title: Ecommerce web app deployed on Kubernetes
    source:
      repo: https://github.com/GoogleCloudPlatform/terraform-ecommerce-microservices-on-gke.git
      sourceType: git
      dir: /infra
    actuationTool:
      flavor: Terraform
      version: ">= 0.13"
    description: {}
  content:
    examples:
      - name: simple_example
        location: examples/simple_example
  interfaces:
    variables:
      - name: labels
        description: A set of key/value label pairs to assign to the resources deployed by this blueprint.
        varType: map(string)
        defaultValue: {}
      - name: project_id
        description: The Google Cloud project ID.
        varType: string
        required: true
      - name: resource_name_suffix
        description: "  Optional string added to the end of resource names, allowing project reuse.\n  This should be short and only contain dashes, lowercase letters, and digits.\n  It shoud not end with a dash.\n"
        varType: string
        defaultValue: "-1"
    outputs:
      - name: deployment_ip_address
        description: Public IP address of the deployment
      - name: neos_toc_url
        description: Neos Tutorial URL
  requirements:
    roles:
      - level: Project
        roles:
          - roles/compute.networkAdmin
          - roles/container.admin
          - roles/gkehub.editor
          - roles/iam.serviceAccountAdmin
          - roles/iam.serviceAccountUser
          - roles/resourcemanager.projectIamAdmin
          - roles/serviceusage.serviceUsageAdmin
    services:
      - cloudresourcemanager.googleapis.com
      - storage-api.googleapis.com
      - serviceusage.googleapis.com
