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

# yamllint disable rule:indentation
values:
  module.cf-http.google_cloudfunctions2_function.function:
    name: test-cf-http
    service_config:
      - secret_environment_variables:
          - key: VARIABLE_SECRET
            project_id: project-id
            # secret: var_secret # known after apply
            version: latest
        secret_volumes:
          - mount_path: /app/secret
            project_id: project-id
            # secret: var_secret # known after apply
            versions:
              - {}
        service_account_email: test-cf-http@project-id.iam.gserviceaccount.com
  module.cf-http.google_service_account.service_account[0]:
    account_id: test-cf-http
    create_ignore_already_exists: null
    description: null
    disabled: false
    display_name: test-cf-http
    email: test-cf-http@project-id.iam.gserviceaccount.com
    member: serviceAccount:test-cf-http@project-id.iam.gserviceaccount.com
    project: project-id
    timeouts: null
  module.secret-manager.google_secret_manager_secret.default["credentials"]:
    annotations: null
    deletion_protection: false
    effective_labels:
      goog-terraform-provisioned: 'true'
    labels: null
    project: project-id
    replication:
      - auto:
        - customer_managed_encryption: []
        user_managed: []
    rotation: []
    secret_id: credentials
    tags: null
    terraform_labels:
      goog-terraform-provisioned: 'true'
    timeouts: null
    topics: []
    ttl: null
    version_aliases: null
    version_destroy_ttl: null
  module.secret-manager.google_secret_manager_secret_iam_binding.authoritative["credentials.roles/secretmanager.secretAccessor"]:
    condition: []
    members:
      - serviceAccount:test-cf-http@project-id.iam.gserviceaccount.com
    role: roles/secretmanager.secretAccessor
  module.secret-manager.google_secret_manager_secret_version.default["credentials/v1"]:
    deletion_policy: DELETE
    enabled: true
    is_secret_data_base64: false
    secret_data: manual foo bar spam
    secret_data_wo: null
    secret_data_wo_version: 0
    timeouts: null

counts:
  google_cloudfunctions2_function: 1
  google_secret_manager_secret: 1
  google_secret_manager_secret_iam_binding: 1
  google_secret_manager_secret_version: 1
  google_service_account: 1
