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

apiVersion: blueprints.cloud.google.com/v1alpha1
kind: BlueprintMetadata
metadata:
  name: terraform-google-firestore-display
  annotations:
    config.kubernetes.io/local-config: "true"
spec:
  info:
    title: terraform-google-firestore
    source:
      repo: https://github.com/GoogleCloudPlatform/terraform-google-firestore.git
      sourceType: git
  ui:
    input:
      variables:
        backup_schedule_configuration:
          name: backup_schedule_configuration
          title: Backup Schedule Configuration
        composite_index_configuration:
          name: composite_index_configuration
          title: Composite Index Configuration
        concurrency_mode:
          name: concurrency_mode
          title: Concurrency Mode
          enumValueLabels:
            - label: OPTIMISTIC
              value: OPTIMISTIC
            - label: PESSIMISTIC
              value: PESSIMISTIC
            - label: OPTIMISTIC_WITH_ENTITY_GROUPS
              value: OPTIMISTIC_WITH_ENTITY_GROUPS
        database_id:
          name: database_id
          title: Database Id
          regexValidation: ^[a-z][a-z0-9-]{2,61}[a-z0-9]$
          validation: Use lowercase letters, numbers, and hyphens. Start with a letter and end with letter/number. Must be between 4 and 63 characters.
        database_type:
          name: database_type
          title: Database Type
          enumValueLabels:
            - label: FIRESTORE_NATIVE
              value: FIRESTORE_NATIVE
            - label: DATASTORE_MODE
              value: DATASTORE_MODE
        delete_protection_state:
          name: delete_protection_state
          title: Delete Protection State
          enumValueLabels:
            - label: DELETE_PROTECTION_ENABLED
              value: DELETE_PROTECTION_ENABLED
            - label: DELETE_PROTECTION_DISABLED
              value: DELETE_PROTECTION_DISABLED
        deletion_policy:
          name: deletion_policy
          title: Deletion Policy
          enumValueLabels:
            - label: DELETE
              value: DELETE
            - label: ABANDON
              value: ABANDON
        field_configuration:
          name: field_configuration
          title: Field Configuration
        kms_key_name:
          name: kms_key_name
          title: Kms Key Name
        location:
          name: location
          title: Location
        point_in_time_recovery_enablement:
          name: point_in_time_recovery_enablement
          title: Point In Time Recovery Enablement
          enumValueLabels:
            - label: POINT_IN_TIME_RECOVERY_ENABLED
              value: POINT_IN_TIME_RECOVERY_ENABLED
            - label: POINT_IN_TIME_RECOVERY_DISABLED
              value: POINT_IN_TIME_RECOVERY_DISABLED
        project_id:
          name: project_id
          title: Project Id
