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

---
driver:
  name: "terraform"
  command_timeout: 1800

provisioner:
  name: "terraform"

platforms:
  - name: local

suites:
  - name: "simple_project"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/simple_project/
    verifier:
      name: terraform
      color: true
      systems:
        - name: inspec-gcp
          backend: gcp
          controls:
            - gcp
        - name: local
          backend: local
          controls:
            - gcloud
  - name: "simple_project_with_regional_network"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/simple_project_with_regional_network/
    verifier:
      name: terraform
      color: true
      systems:
        - name: inspec-gcp
          backend: gcp
          controls:
            - gcp
  - name: "secondary_ranges"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/secondary_ranges/
    verifier:
      name: terraform
      color: true
      systems:
        - name: local
          attrs_outputs:
            customized_inspec_attribute: output_network_name
            customized_inspec_attribute: output_network_self_link
            customized_inspec_attribute: output_subnets_ips
            customized_inspec_attribute: output_routes
            customized_inspec_attribute: output_subnets_flow_logs
            customized_inspec_attribute: output_subnets_names
            customized_inspec_attribute: output_subnets_private_access
            customized_inspec_attribute: output_subnets_regions
            customized_inspec_attribute: output_subnets_secondary_ranges
            customized_inspec_attribute: output_project_id
          backend: local
          controls:
            - gcloud
            - inspec_attributes
  - name: "multi_vpc"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/multi_vpc/
    verifier:
      name: terraform
      color: true
      systems:
        - name: local
          backend: local
          controls:
            - gcloud
  - name: "delete_default_gateway_routes"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/delete_default_gateway_routes/
    verifier:
      name: terraform
      color: true
      systems:
        - name: local
          backend: local
          controls:
            - gcloud
  - name: "submodule_firewall"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/submodule_firewall/
    verifier:
      name: terraform
      color: true
      systems:
        - name: inspec-gcp
          backend: gcp
          controls:
            - gcp
        - name: local
          attrs_outputs:
            customized_inspec_attribute: output_network_name
            customized_inspec_attribute: output_network_self_link
            customized_inspec_attribute: output_subnets_ips
            customized_inspec_attribute: output_routes
            customized_inspec_attribute: output_subnets_flow_logs
            customized_inspec_attribute: output_subnets_names
            customized_inspec_attribute: output_subnets_private_access
            customized_inspec_attribute: output_subnets_regions
            customized_inspec_attribute: output_subnets_secondary_ranges
            customized_inspec_attribute: output_project_id
          backend: local
          controls:
            - gcloud
            - inspec_attributes
  - name: "submodule_network_peering"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/submodule_network_peering/
    verifier:
      name: terraform
      color: true
      systems:
        - name: local
          backend: local
          controls:
            - gcloud
  - name: "ilb_routing"
    driver:
      name: "terraform"
      command_timeout: 1800
      root_module_directory: test/fixtures/ilb_routing/
    verifier:
      name: terraform
      color: true
      systems:
        - name: local
          backend: local
          controls:
            - gcloud
