diff --git a/test/integration/verify/controls/container_cluster.rb b/test/integration/verify/controls/container_cluster.rb index 151d6ff1d..b732c1aff 100644 --- a/test/integration/verify/controls/container_cluster.rb +++ b/test/integration/verify/controls/container_cluster.rb @@ -1,16 +1,14 @@ title 'GKE Container Cluster Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: '', description: 'The GKE cluster name.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: '', description: 'The GKE cluster zone.') -gcp_kube_cluster_master_user = attribute(:gcp_kube_cluster_master_user, default: '', description: 'The GKE cluster master user.') -gcp_kube_cluster_master_pass = attribute(:gcp_kube_cluster_master_pass, default: '', description: 'The GKE cluster master password.') -gcp_kube_cluster_zone_extra1 = attribute(:gcp_kube_cluster_zone_extra1, default: '', description: 'The GKE cluster secondary zone.') -gcp_kube_cluster_zone_extra2 = attribute(:gcp_kube_cluster_zone_extra2, default: '', description: 'The GKE cluster tertiary zone.') - +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') +gcp_kube_cluster_master_user = input(:gcp_kube_cluster_master_user, value: '', description: 'The GKE cluster master user.') +gcp_kube_cluster_master_pass = input(:gcp_kube_cluster_master_pass, value: '', description: 'The GKE cluster master password.') +gcp_kube_cluster_zone_extra1 = input(:gcp_kube_cluster_zone_extra1, value: '', description: 'The GKE cluster secondary zone.') +gcp_kube_cluster_zone_extra2 = input(:gcp_kube_cluster_zone_extra2, value: '', description: 'The GKE cluster tertiary zone.') control 'gcp-gke-container-cluster-1.0' do - impact 1.0 title 'Ensure GKE Container Cluster was built correctly' @@ -36,8 +34,8 @@ its('master_auth.password'){ should eq gcp_kube_cluster_master_pass} # no special network settings currently applied - its('network'){should eq "default"} - its('subnetwork'){should eq "default"} + its('network'){should eq "value"} + its('subnetwork'){should eq "value"} # check node configuration settings its('node_config.disk_size_gb'){should eq 100} diff --git a/test/integration/verify/controls/container_clusters.rb b/test/integration/verify/controls/container_clusters.rb index ea43cc127..cd71e337b 100644 --- a/test/integration/verify/controls/container_clusters.rb +++ b/test/integration/verify/controls/container_clusters.rb @@ -1,11 +1,10 @@ title 'Retrieve all GCP Container Clusters for a project and zone' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: '', description: 'The GKE cluster name.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: '', description: 'The GKE cluster zone.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') control 'gcp-container-clusters-1.0' do - impact 1.0 title 'Ensure container clusters have the correct properties in bulk.' diff --git a/test/integration/verify/controls/container_nodepool.rb b/test/integration/verify/controls/container_nodepool.rb index e229f8872..06fe198ec 100644 --- a/test/integration/verify/controls/container_nodepool.rb +++ b/test/integration/verify/controls/container_nodepool.rb @@ -1,13 +1,12 @@ title 'GKE Container Node Pool Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: '', description: 'The GKE cluster name.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: '', description: 'The GKE cluster zone.') -gcp_kube_cluster_size = attribute(:gcp_kube_cluster_size, default: '', description: 'The GKE cluster initial size.') -gcp_kube_nodepool_name = attribute(:gcp_kube_nodepool_name, default:'', description: 'The GKE cluster node pool name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') +gcp_kube_cluster_size = input(:gcp_kube_cluster_size, value: '', description: 'The GKE cluster initial size.') +gcp_kube_nodepool_name = input(:gcp_kube_nodepool_name, value: '', description: 'The GKE cluster node pool name.') control 'gcp-gke-container-node-pool-1.0' do - impact 1.0 title 'Ensure GKE Container Node Pool was built correctly' diff --git a/test/integration/verify/controls/container_nodepools.rb b/test/integration/verify/controls/container_nodepools.rb index 3f3cdfc19..e37e1b3e2 100644 --- a/test/integration/verify/controls/container_nodepools.rb +++ b/test/integration/verify/controls/container_nodepools.rb @@ -1,12 +1,11 @@ title 'Retrieve all GCP Container Cluster Node Pools for a project, cluster and zone' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: '', description: 'The GKE cluster name.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: '', description: 'The GKE cluster zone.') -gcp_kube_nodepool_name = attribute(:gcp_kube_nodepool_name, default:'', description: 'The GKE cluster node pool name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The GKE cluster name.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The GKE cluster zone.') +gcp_kube_nodepool_name = input(:gcp_kube_nodepool_name, value:'', description: 'The GKE cluster node pool name.') control 'gcp-container-cluster-node-pools-1.0' do - impact 1.0 title 'Ensure container cluster node pools have the correct properties in bulk.' diff --git a/test/integration/verify/controls/gcp_project.rb b/test/integration/verify/controls/gcp_project.rb index d76a97d3c..07bfe637b 100644 --- a/test/integration/verify/controls/gcp_project.rb +++ b/test/integration/verify/controls/gcp_project.rb @@ -1,8 +1,8 @@ title 'Project Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_project_name = attribute(:gcp_project_name, default: '', description: 'The GCP project name.') -gcp_project_number = attribute(:gcp_project_number, default: '', description: 'The GCP project number.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_project_name = input(:gcp_project_name, value: '', description: 'The GCP project name.') +gcp_project_number = input(:gcp_project_number, value: '', description: 'The GCP project number.') control 'gcp-project' do diff --git a/test/integration/verify/controls/generic_external_vm.rb b/test/integration/verify/controls/generic_external_vm.rb index dde8a8df4..12e10d6ab 100644 --- a/test/integration/verify/controls/generic_external_vm.rb +++ b/test/integration/verify/controls/generic_external_vm.rb @@ -1,13 +1,12 @@ title 'External Virtual Machine Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: '', description: 'The GCP zone being used.') -gcp_ext_vm_name = attribute(:gcp_ext_vm_name, default: '', description: 'The GCP VM name.') -gcp_ext_vm_size = attribute(:gcp_ext_vm_size, default: '', description: 'The GCP VM machine type or size.') -#gcp_int_vm_image = attribute(:gcp_ext_vm_image, default: '', description: 'The GCP VM image.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') +gcp_ext_vm_name = input(:gcp_ext_vm_name, value: '', description: 'The GCP VM name.') +gcp_ext_vm_size = input(:gcp_ext_vm_size, value: '', description: 'The GCP VM machine type or size.') +#gcp_int_vm_image = input(:gcp_ext_vm_image, value: '', description: 'The GCP VM image.') control 'gcp-generic-vm-linux-external-1.0' do - impact 1.0 title 'Ensure External VM was built and has the correct properties' diff --git a/test/integration/verify/controls/generic_external_vm_data_disk.rb b/test/integration/verify/controls/generic_external_vm_data_disk.rb index c41e64b30..48fdaed69 100644 --- a/test/integration/verify/controls/generic_external_vm_data_disk.rb +++ b/test/integration/verify/controls/generic_external_vm_data_disk.rb @@ -1,13 +1,12 @@ title 'External Virtual Machine Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: '', description: 'The GCP zone being used.') -gcp_ext_vm_data_disk_name = attribute(:gcp_ext_vm_data_disk_name, default: '', description: 'The GCP VM name.') -gcp_ext_vm_data_disk_size = attribute(:gcp_ext_vm_size, default: '', description: 'The GCP VM machine type or size.') -gcp_compute_disk_name = attribute(:gcp_compute_disk_name, default: '', description: 'The GCP VM attached disk name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') +gcp_ext_vm_data_disk_name = input(:gcp_ext_vm_data_disk_name, value: '', description: 'The GCP VM name.') +gcp_ext_vm_data_disk_size = input(:gcp_ext_vm_size, value: '', description: 'The GCP VM machine type or size.') +gcp_compute_disk_name = input(:gcp_compute_disk_name, value: '', description: 'The GCP VM attached disk name.') control 'gcp-generic-vm-linux-external-data-disk-1.0' do - impact 1.0 title 'Ensure External VM was built with attached data disk and has the correct properties' diff --git a/test/integration/verify/controls/generic_iam_role.rb b/test/integration/verify/controls/generic_iam_role.rb index 558c730be..30ca93265 100644 --- a/test/integration/verify/controls/generic_iam_role.rb +++ b/test/integration/verify/controls/generic_iam_role.rb @@ -1,8 +1,8 @@ title 'IAM Role Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_project_iam_custom_role_id = attribute(:gcp_project_iam_custom_role_id, default: '', description: 'The GCP IAM custom role identifier.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_project_iam_custom_role_id = input(:gcp_project_iam_custom_role_id, value: '', description: 'The GCP IAM custom role identifier.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-generic-iam-role' do only_if { gcp_enable_privileged_resources.to_i == 1 } diff --git a/test/integration/verify/controls/generic_image_family.rb b/test/integration/verify/controls/generic_image_family.rb index 2f4f94608..a91b79cef 100644 --- a/test/integration/verify/controls/generic_image_family.rb +++ b/test/integration/verify/controls/generic_image_family.rb @@ -1,14 +1,12 @@ title 'Image Family' -gcp_int_vm_image = attribute(:gcp_ext_vm_image, default: '', description: 'The GCP VM image.') +gcp_int_vm_image = input(:gcp_ext_vm_image, value: '', description: 'The GCP VM image.') control 'gcp-generic-image-family-1.0' do - impact 1.0 title 'Ensure that the image is correct' describe google_compute_image(project: gcp_int_vm_image.split('/').first, name: gcp_int_vm_image.split('/').last ) do - its('name') { should match "ubuntu" } its('family') { should match "ubuntu" } # the image should be available for use diff --git a/test/integration/verify/controls/generic_internal_vm.rb b/test/integration/verify/controls/generic_internal_vm.rb index b99b6b1ab..4ae051fd5 100644 --- a/test/integration/verify/controls/generic_internal_vm.rb +++ b/test/integration/verify/controls/generic_internal_vm.rb @@ -1,10 +1,10 @@ title 'Internal Virtual Machine Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: '', description: 'The GCP zone being used.') -gcp_int_vm_name = attribute(:gcp_int_vm_name, default: '', description: 'The GCP VM name.') -gcp_int_vm_size = attribute(:gcp_int_vm_size, default: '', description: 'The GCP VM size.') -#gcp_int_vm_image = attribute(:gcp_int_vm_image, default: '', description: 'The GCP VM image.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') +gcp_int_vm_name = input(:gcp_int_vm_name, value: '', description: 'The GCP VM name.') +gcp_int_vm_size = input(:gcp_int_vm_size, value: '', description: 'The GCP VM size.') +#gcp_int_vm_image = input(:gcp_int_vm_image, value: '', description: 'The GCP VM image.') control 'gcp-generic-vm-linux-internal-1.0' do diff --git a/test/integration/verify/controls/generic_public_ip_address.rb b/test/integration/verify/controls/generic_public_ip_address.rb index b6498d37e..424c25672 100644 --- a/test/integration/verify/controls/generic_public_ip_address.rb +++ b/test/integration/verify/controls/generic_public_ip_address.rb @@ -1,9 +1,9 @@ title 'Public IP Address Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_ext_compute_address_name = attribute(:gcp_ext_compute_address_name,default: '',description:'The GCP compute address.') -gcp_ext_vm_name = attribute(:gcp_ext_vm_name, default: '', description: 'The GCP generic external VM name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_ext_compute_address_name = input(:gcp_ext_compute_address_name, value: '',description:'The GCP compute address.') +gcp_ext_vm_name = input(:gcp_ext_vm_name, value: '', description: 'The GCP generic external VM name.') control 'gcp-generic-public-ip-address-1.0' do diff --git a/test/integration/verify/controls/generic_windows_internal_vm.rb b/test/integration/verify/controls/generic_windows_internal_vm.rb index f8ddb6654..2f28befec 100644 --- a/test/integration/verify/controls/generic_windows_internal_vm.rb +++ b/test/integration/verify/controls/generic_windows_internal_vm.rb @@ -1,10 +1,10 @@ title 'Internal Windows Virtual Machine Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: '', description: 'The GCP zone being used.') -gcp_windows_int_vm_name = attribute(:gcp_windows_int_vm_name, default: '', description: 'The GCP VM name.') -gcp_windows_int_vm_size = attribute(:gcp_windows_int_vm_size, default: '', description: 'The GCP VM size.') -#gcp_windows_int_vm_image = attribute(:gcp_int_vm_size, default: '', description: 'The GCP VM size.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') +gcp_windows_int_vm_name = input(:gcp_windows_int_vm_name, value: '', description: 'The GCP VM name.') +gcp_windows_int_vm_size = input(:gcp_windows_int_vm_size, value: '', description: 'The GCP VM size.') +#gcp_windows_int_vm_image = input(:gcp_int_vm_size, value: '', description: 'The GCP VM size.') control 'gcp-generic-vm-windows-internal-1.0' do diff --git a/test/integration/verify/controls/google_access_context_manager_access_level.rb b/test/integration/verify/controls/google_access_context_manager_access_level.rb index f17ef1ad7..8c60b2072 100644 --- a/test/integration/verify/controls/google_access_context_manager_access_level.rb +++ b/test/integration/verify/controls/google_access_context_manager_access_level.rb @@ -1,27 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_access_context_manager_access_level resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -service_perimeter = attribute('service_perimeter', default: { - "name": "restrict_all", - "title": "restrict_all", - "restricted_service": "storage.googleapis.com", - "policy_title": "policytitle" -}, description: 'Service perimeter definition') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the perimeter') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +# service_perimeter = input('service_perimeter', value: { +# "name": "restrict_all", +# "title": "restrict_all", +# "restricted_service": "storage.googleapis.com", +# "policy_title": "policytitle" +# }, description: 'Service perimeter definition') control 'google_access_context_manager_access_level-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_access_context_manager_access_levels.rb b/test/integration/verify/controls/google_access_context_manager_access_levels.rb index d3ed69d32..8782e3e21 100644 --- a/test/integration/verify/controls/google_access_context_manager_access_levels.rb +++ b/test/integration/verify/controls/google_access_context_manager_access_levels.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_access_context_manager_access_levels resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -service_perimeter = attribute('service_perimeter', default: { +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the perimeter') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", diff --git a/test/integration/verify/controls/google_access_context_manager_access_policies.rb b/test/integration/verify/controls/google_access_context_manager_access_policies.rb index 84da2696f..364f63a5c 100644 --- a/test/integration/verify/controls/google_access_context_manager_access_policies.rb +++ b/test/integration/verify/controls/google_access_context_manager_access_policies.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_access_context_manager_access_policies resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -service_perimeter = attribute('service_perimeter', default: { +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the perimeter') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') + control 'google_access_context_manager_access_policies-1.0' do impact 1.0 title 'google_access_context_manager_access_policies resource test' diff --git a/test/integration/verify/controls/google_access_context_manager_access_policy.rb b/test/integration/verify/controls/google_access_context_manager_access_policy.rb index eb67085ab..7faba392b 100644 --- a/test/integration/verify/controls/google_access_context_manager_access_policy.rb +++ b/test/integration/verify/controls/google_access_context_manager_access_policy.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_access_context_manager_access_policy resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -service_perimeter = attribute('service_perimeter', default: { +gcp_organization_id = input(:gcp_organization_id, value: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') + control 'google_access_context_manager_access_policy-1.0' do impact 1.0 title 'google_access_context_manager_access_policy resource test' diff --git a/test/integration/verify/controls/google_access_context_manager_service_perimeter.rb b/test/integration/verify/controls/google_access_context_manager_service_perimeter.rb index 5319c52ee..397c3830e 100644 --- a/test/integration/verify/controls/google_access_context_manager_service_perimeter.rb +++ b/test/integration/verify/controls/google_access_context_manager_service_perimeter.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_access_context_manager_service_perimeter resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -service_perimeter = attribute('service_perimeter', default: { +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the perimeter') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') + control 'google_access_context_manager_service_perimeter-1.0' do impact 1.0 title 'google_access_context_manager_service_perimeter resource test' diff --git a/test/integration/verify/controls/google_access_context_manager_service_perimeters.rb b/test/integration/verify/controls/google_access_context_manager_service_perimeters.rb index 1b770f4bf..173321698 100644 --- a/test/integration/verify/controls/google_access_context_manager_service_perimeters.rb +++ b/test/integration/verify/controls/google_access_context_manager_service_perimeters.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_access_context_manager_service_perimeters resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the perimeter') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -service_perimeter = attribute('service_perimeter', default: { +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the perimeter') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +service_perimeter = input('service_perimeter', value: { "name": "restrict_all", "title": "restrict_all", "restricted_service": "storage.googleapis.com", "policy_title": "policytitle" }, description: 'Service perimeter definition') + control 'google_access_context_manager_service_perimeters-1.0' do impact 1.0 title 'google_access_context_manager_service_perimeters resource test' diff --git a/test/integration/verify/controls/google_appengine_standard_app_version.rb b/test/integration/verify/controls/google_appengine_standard_app_version.rb index 67ca44007..0779c11bf 100644 --- a/test/integration/verify/controls/google_appengine_standard_app_version.rb +++ b/test/integration/verify/controls/google_appengine_standard_app_version.rb @@ -1,30 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_appengine_standard_app_version resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') -standardappversion = attribute('standardappversion', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project location.') +standardappversion = input('standardappversion', value: { "version_id": "v2", "service": "default", "runtime": "nodejs10", "entrypoint": "node ./app.js", "port": "8080" }, description: 'Cloud App Engine definition') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_appengine_standard_app_version-1.0' do impact 1.0 title 'google_appengine_standard_app_version resource test' diff --git a/test/integration/verify/controls/google_appengine_standard_app_versions.rb b/test/integration/verify/controls/google_appengine_standard_app_versions.rb index 1cae916ab..4f7948eaa 100644 --- a/test/integration/verify/controls/google_appengine_standard_app_versions.rb +++ b/test/integration/verify/controls/google_appengine_standard_app_versions.rb @@ -1,30 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_appengine_standard_app_versions resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') -standardappversion = attribute('standardappversion', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project location.') +standardappversion = input('standardappversion', value: { "version_id": "v2", "service": "default", "runtime": "nodejs10", "entrypoint": "node ./app.js", "port": "8080" }, description: 'Cloud App Engine definition') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_appengine_standard_app_versions-1.0' do impact 1.0 title 'google_appengine_standard_app_versions resource test' diff --git a/test/integration/verify/controls/google_bigquery_dataset.rb b/test/integration/verify/controls/google_bigquery_dataset.rb index 7d9963430..aebe77b2e 100644 --- a/test/integration/verify/controls/google_bigquery_dataset.rb +++ b/test/integration/verify/controls/google_bigquery_dataset.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_bigquery_dataset resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -dataset = attribute('dataset', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", @@ -24,6 +10,7 @@ "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') + control 'google_bigquery_dataset-1.0' do impact 1.0 title 'google_bigquery_dataset resource test' diff --git a/test/integration/verify/controls/google_bigquery_datasets.rb b/test/integration/verify/controls/google_bigquery_datasets.rb index b68cd2a0c..c2850a474 100644 --- a/test/integration/verify/controls/google_bigquery_datasets.rb +++ b/test/integration/verify/controls/google_bigquery_datasets.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_bigquery_datasets resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -dataset = attribute('dataset', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", @@ -24,6 +10,7 @@ "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') + control 'google_bigquery_datasets-1.0' do impact 1.0 title 'google_bigquery_datasets resource test' diff --git a/test/integration/verify/controls/google_bigquery_table.rb b/test/integration/verify/controls/google_bigquery_table.rb index b5fdb7f3d..142597f4e 100644 --- a/test/integration/verify/controls/google_bigquery_table.rb +++ b/test/integration/verify/controls/google_bigquery_table.rb @@ -1,27 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_bigquery_table resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -bigquery_table = attribute('bigquery_table', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +bigquery_table = input('bigquery_table', value: { "table_id": "inspec_gcp_bigquery_table", "description": "A BigQuery table", "expiration_time": 1738882264000, "time_partitioning_type": "DAY" }, description: 'BigQuery table definition') -dataset = attribute('dataset', default: { +dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", @@ -30,6 +16,7 @@ "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') + control 'google_bigquery_table-1.0' do impact 1.0 title 'google_bigquery_table resource test' diff --git a/test/integration/verify/controls/google_bigquery_tables.rb b/test/integration/verify/controls/google_bigquery_tables.rb index f9624d493..1bf3baa73 100644 --- a/test/integration/verify/controls/google_bigquery_tables.rb +++ b/test/integration/verify/controls/google_bigquery_tables.rb @@ -1,27 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_bigquery_tables resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -bigquery_table = attribute('bigquery_table', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +bigquery_table = input('bigquery_table', value: { "table_id": "inspec_gcp_bigquery_table", "description": "A BigQuery table", "expiration_time": 1738882264000, "time_partitioning_type": "DAY" }, description: 'BigQuery table definition') -dataset = attribute('dataset', default: { +dataset = input('dataset', value: { "dataset_id": "inspec_gcp_dataset", "friendly_name": "A BigQuery dataset test", "description": "Test BigQuery dataset description", @@ -30,6 +16,7 @@ "access_writer_role": "WRITER", "access_writer_special_group": "projectWriters" }, description: 'BigQuery dataset definition') + control 'google_bigquery_tables-1.0' do impact 1.0 title 'google_bigquery_tables resource test' diff --git a/test/integration/verify/controls/google_billing_project_billing_info.rb b/test/integration/verify/controls/google_billing_project_billing_info.rb index 56a61115e..cba6897dc 100644 --- a/test/integration/verify/controls/google_billing_project_billing_info.rb +++ b/test/integration/verify/controls/google_billing_project_billing_info.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_billing_project_billing_info resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_billing_account = attribute(:gcp_billing_account, default: 'gcp_billing_account', description: 'The GCP billing account name.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_billing_account = input(:gcp_billing_account, value: '', description: 'The GCP billing account name.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_billing_project_billing_info-1.0' do impact 1.0 title 'google_billing_project_billing_info resource test' diff --git a/test/integration/verify/controls/google_cloud_scheduler_job.rb b/test/integration/verify/controls/google_cloud_scheduler_job.rb index 9a26404a3..f1e1c7f5c 100644 --- a/test/integration/verify/controls/google_cloud_scheduler_job.rb +++ b/test/integration/verify/controls/google_cloud_scheduler_job.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_cloud_scheduler_job resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -scheduler_job = attribute('scheduler_job', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +scheduler_job = input('scheduler_job', value: { "region": "us-central1", "name": "job-name", "description": "A description", @@ -24,6 +10,7 @@ "http_method": "POST", "http_target_uri": "https://example.com/ping" }, description: 'Cloud Scheduler Job configuration') + control 'google_cloud_scheduler_job-1.0' do impact 1.0 title 'google_cloud_scheduler_job resource test' diff --git a/test/integration/verify/controls/google_cloud_scheduler_jobs.rb b/test/integration/verify/controls/google_cloud_scheduler_jobs.rb index 12f7b540c..58f6d0125 100644 --- a/test/integration/verify/controls/google_cloud_scheduler_jobs.rb +++ b/test/integration/verify/controls/google_cloud_scheduler_jobs.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_cloud_scheduler_jobs resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -scheduler_job = attribute('scheduler_job', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +scheduler_job = input('scheduler_job', value: { "region": "us-central1", "name": "job-name", "description": "A description", @@ -24,6 +10,7 @@ "http_method": "POST", "http_target_uri": "https://example.com/ping" }, description: 'Cloud Scheduler Job configuration') + control 'google_cloud_scheduler_jobs-1.0' do impact 1.0 title 'google_cloud_scheduler_jobs resource test' diff --git a/test/integration/verify/controls/google_cloudbuild_trigger.rb b/test/integration/verify/controls/google_cloudbuild_trigger.rb index 1edc14158..089e6e816 100644 --- a/test/integration/verify/controls/google_cloudbuild_trigger.rb +++ b/test/integration/verify/controls/google_cloudbuild_trigger.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_cloudbuild_trigger resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -trigger = attribute('trigger', default: { +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +trigger = input('trigger', value: { "trigger_template_project": "trigger-project", "trigger_template_branch": "trigger-branch", "trigger_template_repo": "trigger-repo", "filename": "cloudbuild.yaml" }, description: 'CloudBuild trigger definition') + control 'google_cloudbuild_trigger-1.0' do impact 1.0 title 'google_cloudbuild_trigger resource test' diff --git a/test/integration/verify/controls/google_cloudbuild_triggers.rb b/test/integration/verify/controls/google_cloudbuild_triggers.rb index 13c853257..eb99d4922 100644 --- a/test/integration/verify/controls/google_cloudbuild_triggers.rb +++ b/test/integration/verify/controls/google_cloudbuild_triggers.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_cloudbuild_triggers resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -trigger = attribute('trigger', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +trigger = input('trigger', value: { "trigger_template_project": "trigger-project", "trigger_template_branch": "trigger-branch", "trigger_template_repo": "trigger-repo", "filename": "cloudbuild.yaml" }, description: 'CloudBuild trigger definition') + control 'google_cloudbuild_triggers-1.0' do impact 1.0 title 'google_cloudbuild_triggers resource test' diff --git a/test/integration/verify/controls/google_cloudfunctions_cloud_function.rb b/test/integration/verify/controls/google_cloudfunctions_cloud_function.rb index 182e829ed..53522d4da 100644 --- a/test/integration/verify/controls/google_cloudfunctions_cloud_function.rb +++ b/test/integration/verify/controls/google_cloudfunctions_cloud_function.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_cloudfunctions_cloud_function resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_cloud_function_region = attribute(:gcp_cloud_function_region, default: 'gcp_cloud_function_region', description: 'The Cloud Function region.') -cloudfunction = attribute('cloudfunction', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_cloud_function_region = input(:gcp_cloud_function_region, value: '', description: 'The Cloud Function region.') +cloudfunction = input('cloudfunction', value: { "name": "inspec-gcp-function", "description": "A description of the function", "available_memory_mb": 128, @@ -25,6 +11,7 @@ "entry_point": "hello", "env_var_value": "val1" }, description: 'Cloud Function definition') + control 'google_cloudfunctions_cloud_function-1.0' do impact 1.0 title 'google_cloudfunctions_cloud_function resource test' diff --git a/test/integration/verify/controls/google_cloudfunctions_cloud_functions.rb b/test/integration/verify/controls/google_cloudfunctions_cloud_functions.rb index 41f937da8..c02c50280 100644 --- a/test/integration/verify/controls/google_cloudfunctions_cloud_functions.rb +++ b/test/integration/verify/controls/google_cloudfunctions_cloud_functions.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_cloudfunctions_cloud_functions resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_cloud_function_region = attribute(:gcp_cloud_function_region, default: 'gcp_cloud_function_region', description: 'The Cloud Function region.') -cloudfunction = attribute('cloudfunction', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_cloud_function_region = input(:gcp_cloud_function_region, value: '', description: 'The Cloud Function region.') +cloudfunction = input('cloudfunction', value: { "name": "inspec-gcp-function", "description": "A description of the function", "available_memory_mb": 128, @@ -25,6 +11,7 @@ "entry_point": "hello", "env_var_value": "val1" }, description: 'Cloud Function definition') + control 'google_cloudfunctions_cloud_functions-1.0' do impact 1.0 title 'google_cloudfunctions_cloud_functions resource test' diff --git a/test/integration/verify/controls/google_compute_accelerator_type.rb b/test/integration/verify/controls/google_compute_accelerator_type.rb index 0cd04ac01..e20bc3514 100644 --- a/test/integration/verify/controls/google_compute_accelerator_type.rb +++ b/test/integration/verify/controls/google_compute_accelerator_type.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_accelerator_type resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -accelerator_type = attribute('accelerator_type', default: null, description: 'The accelerator type') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +accelerator_type = input('accelerator_type', value: null, description: 'The accelerator type') + control 'google_compute_accelerator_type-1.0' do impact 1.0 title 'google_compute_accelerator_type resource test' diff --git a/test/integration/verify/controls/google_compute_accelerator_types.rb b/test/integration/verify/controls/google_compute_accelerator_types.rb index c0d763eda..6dec0a1be 100644 --- a/test/integration/verify/controls/google_compute_accelerator_types.rb +++ b/test/integration/verify/controls/google_compute_accelerator_types.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_accelerator_types resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -accelerator_type = attribute('accelerator_type', default: null, description: 'The accelerator type') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +# accelerator_type = input('accelerator_type', value: null, description: 'The accelerator type') + control 'google_compute_accelerator_types-1.0' do impact 1.0 title 'google_compute_accelerator_types resource test' diff --git a/test/integration/verify/controls/google_compute_address.rb b/test/integration/verify/controls/google_compute_address.rb index 30d22bbb6..443498748 100644 --- a/test/integration/verify/controls/google_compute_address.rb +++ b/test/integration/verify/controls/google_compute_address.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_address resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -address = attribute('address', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +address = input('address', value: { "name": "inspec-gcp-global-address", "address_type": "INTERNAL", "address": "10.2.0.3" }, description: 'Address definition') + control 'google_compute_address-1.0' do impact 1.0 title 'google_compute_address resource test' diff --git a/test/integration/verify/controls/google_compute_addresses.rb b/test/integration/verify/controls/google_compute_addresses.rb index a9f52e282..b0d1a9778 100644 --- a/test/integration/verify/controls/google_compute_addresses.rb +++ b/test/integration/verify/controls/google_compute_addresses.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_addresses resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -address = attribute('address', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +address = input('address', value: { "name": "inspec-gcp-global-address", "address_type": "INTERNAL", "address": "10.2.0.3" }, description: 'Address definition') + control 'google_compute_addresses-1.0' do impact 1.0 title 'google_compute_addresses resource test' diff --git a/test/integration/verify/controls/google_compute_autoscaler.rb b/test/integration/verify/controls/google_compute_autoscaler.rb index 0c3ac281c..30b2b4673 100644 --- a/test/integration/verify/controls/google_compute_autoscaler.rb +++ b/test/integration/verify/controls/google_compute_autoscaler.rb @@ -1,34 +1,21 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_autoscaler resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP project zone.') -instance_group_manager = attribute('instance_group_manager', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP project zone.') +instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') -autoscaler = attribute('autoscaler', default: { +autoscaler = input('autoscaler', value: { "name": "inspec-gcp-autoscaler", "max_replicas": 5, "min_replicas": 1, "cooldown_period": 60, "cpu_utilization_target": 0.5 }, description: 'Autoscaler definition') + control 'google_compute_autoscaler-1.0' do impact 1.0 title 'google_compute_autoscaler resource test' diff --git a/test/integration/verify/controls/google_compute_autoscalers.rb b/test/integration/verify/controls/google_compute_autoscalers.rb index f3e78e2f7..d6358558a 100644 --- a/test/integration/verify/controls/google_compute_autoscalers.rb +++ b/test/integration/verify/controls/google_compute_autoscalers.rb @@ -1,34 +1,21 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_autoscalers resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP project zone.') -instance_group_manager = attribute('instance_group_manager', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP project zone.') +instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') -autoscaler = attribute('autoscaler', default: { +autoscaler = input('autoscaler', value: { "name": "inspec-gcp-autoscaler", "max_replicas": 5, "min_replicas": 1, "cooldown_period": 60, "cpu_utilization_target": 0.5 }, description: 'Autoscaler definition') + control 'google_compute_autoscalers-1.0' do impact 1.0 title 'google_compute_autoscalers resource test' diff --git a/test/integration/verify/controls/google_compute_backend_bucket.rb b/test/integration/verify/controls/google_compute_backend_bucket.rb index 7067a2349..a824edcbd 100644 --- a/test/integration/verify/controls/google_compute_backend_bucket.rb +++ b/test/integration/verify/controls/google_compute_backend_bucket.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_backend_bucket resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_name = attribute(:gcp_storage_bucket_name, default: 'gcp_storage_bucket_name', description: 'The GCS bucket name to use for the backend bucket.') -backend_bucket = attribute('backend_bucket', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_storage_bucket_name = input(:gcp_storage_bucket_name, value: '', description: 'The GCS bucket name to use for the backend bucket.') +backend_bucket = input('backend_bucket', value: { "name": "inspec-gcp-backend-bucket", "description": "Backend bucket example", "enable_cdn": true }, description: 'Backend bucket definition') + control 'google_compute_backend_bucket-1.0' do impact 1.0 title 'google_compute_backend_bucket resource test' diff --git a/test/integration/verify/controls/google_compute_backend_buckets.rb b/test/integration/verify/controls/google_compute_backend_buckets.rb index f1ddce6b9..ba0af8226 100644 --- a/test/integration/verify/controls/google_compute_backend_buckets.rb +++ b/test/integration/verify/controls/google_compute_backend_buckets.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_backend_buckets resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_name = attribute(:gcp_storage_bucket_name, default: 'gcp_storage_bucket_name', description: 'The GCS bucket name to use for the backend bucket.') -backend_bucket = attribute('backend_bucket', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_storage_bucket_name = input(:gcp_storage_bucket_name, value: '', description: 'The GCS bucket name to use for the backend bucket.') +backend_bucket = input('backend_bucket', value: { "name": "inspec-gcp-backend-bucket", "description": "Backend bucket example", "enable_cdn": true }, description: 'Backend bucket definition') + control 'google_compute_backend_buckets-1.0' do impact 1.0 title 'google_compute_backend_buckets resource test' diff --git a/test/integration/verify/controls/google_compute_backend_service.rb b/test/integration/verify/controls/google_compute_backend_service.rb index 0845cf4c5..7452bb0ee 100644 --- a/test/integration/verify/controls/google_compute_backend_service.rb +++ b/test/integration/verify/controls/google_compute_backend_service.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_backend_service resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -backend_service = attribute('backend_service', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +backend_service = input('backend_service', value: { "name": "inspec-gcp-backend-service", "description": "A description", "port_name": "http", @@ -23,6 +9,7 @@ "timeout_sec": 10, "enable_cdn": true }, description: 'Backend service definition') + control 'google_compute_backend_service-1.0' do impact 1.0 title 'google_compute_backend_service resource test' diff --git a/test/integration/verify/controls/google_compute_backend_services.rb b/test/integration/verify/controls/google_compute_backend_services.rb index 9b4d11af9..6aa970c37 100644 --- a/test/integration/verify/controls/google_compute_backend_services.rb +++ b/test/integration/verify/controls/google_compute_backend_services.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_backend_services resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -backend_service = attribute('backend_service', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +backend_service = input('backend_service', value: { "name": "inspec-gcp-backend-service", "description": "A description", "port_name": "http", @@ -23,6 +9,7 @@ "timeout_sec": 10, "enable_cdn": true }, description: 'Backend service definition') + control 'google_compute_backend_services-1.0' do impact 1.0 title 'google_compute_backend_services resource test' diff --git a/test/integration/verify/controls/google_compute_disk.rb b/test/integration/verify/controls/google_compute_disk.rb index 889acae23..0fb748e4a 100644 --- a/test/integration/verify/controls/google_compute_disk.rb +++ b/test/integration/verify/controls/google_compute_disk.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_disk resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP project zone.') -snapshot = attribute('snapshot', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP project zone.') +snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", @@ -25,11 +11,11 @@ gcp_compute_disk_name = snapshot["disk_name"] gcp_compute_disk_image = snapshot["disk_image"] gcp_compute_disk_type = snapshot["disk_type"] + control 'google_compute_disk-1.0' do impact 1.0 title 'google_compute_disk resource test' - most_recent_image = google_compute_image(project: gcp_compute_disk_image.split('/').first, name: gcp_compute_disk_image.split('/').last) describe google_compute_disk(project: gcp_project_id, name: gcp_compute_disk_name, zone: gcp_zone) do diff --git a/test/integration/verify/controls/google_compute_disk_type.rb b/test/integration/verify/controls/google_compute_disk_type.rb index 9c46069d3..1205a96e3 100644 --- a/test/integration/verify/controls/google_compute_disk_type.rb +++ b/test/integration/verify/controls/google_compute_disk_type.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_disk_type resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -disk_type = attribute('disk_type', default: null, description: 'The accelerator type') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +# disk_type = input('disk_type', default: null, description: 'The accelerator type') + control 'google_compute_disk_type-1.0' do impact 1.0 title 'google_compute_disk_type resource test' diff --git a/test/integration/verify/controls/google_compute_disk_types.rb b/test/integration/verify/controls/google_compute_disk_types.rb index 403bc4cad..68bd32983 100644 --- a/test/integration/verify/controls/google_compute_disk_types.rb +++ b/test/integration/verify/controls/google_compute_disk_types.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_disk_types resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -disk_type = attribute('disk_type', default: null, description: 'The accelerator type') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +# disk_type = input('disk_type', value: null, description: 'The accelerator type') + control 'google_compute_disk_types-1.0' do impact 1.0 title 'google_compute_disk_types resource test' diff --git a/test/integration/verify/controls/google_compute_disks.rb b/test/integration/verify/controls/google_compute_disks.rb index 98379741b..dc7cc7a5e 100644 --- a/test/integration/verify/controls/google_compute_disks.rb +++ b/test/integration/verify/controls/google_compute_disks.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_disks resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP project zone.') -snapshot = attribute('snapshot', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP project zone.') +snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", @@ -25,6 +11,7 @@ gcp_compute_disk_name = snapshot["disk_name"] gcp_compute_disk_image = snapshot["disk_image"] gcp_compute_disk_type = snapshot["disk_type"] + control 'google_compute_disks-1.0' do impact 1.0 title 'google_compute_disks resource test' diff --git a/test/integration/verify/controls/google_compute_external_vpn_gateway.rb b/test/integration/verify/controls/google_compute_external_vpn_gateway.rb index 3d249ad96..af63e582c 100644 --- a/test/integration/verify/controls/google_compute_external_vpn_gateway.rb +++ b/test/integration/verify/controls/google_compute_external_vpn_gateway.rb @@ -1,22 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_external_vpn_gateway resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') - -external_vpn_gateway = attribute('external_vpn_gateway', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +external_vpn_gateway = input('external_vpn_gateway', value: { "name": "external-gateway", "redundancy_type": "SINGLE_IP_INTERNALLY_REDUNDANT", "description": "An externally managed VPN gateway", diff --git a/test/integration/verify/controls/google_compute_external_vpn_gateways.rb b/test/integration/verify/controls/google_compute_external_vpn_gateways.rb index 19946831e..dcd85bd69 100644 --- a/test/integration/verify/controls/google_compute_external_vpn_gateways.rb +++ b/test/integration/verify/controls/google_compute_external_vpn_gateways.rb @@ -1,20 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_external_vpn_gateways resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') + control 'google_compute_external_vpn_gateways-1.0' do impact 1.0 title 'google_compute_external_vpn_gateways resource test' diff --git a/test/integration/verify/controls/google_compute_firewall.rb b/test/integration/verify/controls/google_compute_firewall.rb index f54b4a6a1..b36efc3d9 100644 --- a/test/integration/verify/controls/google_compute_firewall.rb +++ b/test/integration/verify/controls/google_compute_firewall.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_firewall resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -firewall = attribute('firewall', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +firewall = input('firewall', value: { "name": "inspec-gcp-firewall", "source_tag": "some-tag" }, description: 'Firewall rule definition') + control 'google_compute_firewall-1.0' do impact 1.0 title 'google_compute_firewall resource test' diff --git a/test/integration/verify/controls/google_compute_firewalls.rb b/test/integration/verify/controls/google_compute_firewalls.rb index 7d3a36b28..21f1d10fa 100644 --- a/test/integration/verify/controls/google_compute_firewalls.rb +++ b/test/integration/verify/controls/google_compute_firewalls.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_firewalls resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -firewall = attribute('firewall', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +firewall = input('firewall', value: { "name": "inspec-gcp-firewall", "source_tag": "some-tag" }, description: 'Firewall rule definition') + control 'google_compute_firewalls-1.0' do impact 1.0 title 'google_compute_firewalls resource test' diff --git a/test/integration/verify/controls/google_compute_firewalls_handwritten.rb b/test/integration/verify/controls/google_compute_firewalls_handwritten.rb index 4c4b732e9..664312928 100644 --- a/test/integration/verify/controls/google_compute_firewalls_handwritten.rb +++ b/test/integration/verify/controls/google_compute_firewalls_handwritten.rb @@ -1,7 +1,7 @@ title 'Firewalls Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_enable_gcloud_calls = attribute(:gcp_enable_gcloud_calls,default:0,description:'Flag to enable the use of gcloud command line to pull in live data to test against.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_enable_gcloud_calls = input(:gcp_enable_gcloud_calls, value: 0, description: 'Flag to enable the use of gcloud command line to pull in live data to test against.') control 'gcp-firewalls-1.0' do diff --git a/test/integration/verify/controls/google_compute_firewalls_loop.rb b/test/integration/verify/controls/google_compute_firewalls_loop.rb index 3fb41adec..4e68a0fa8 100644 --- a/test/integration/verify/controls/google_compute_firewalls_loop.rb +++ b/test/integration/verify/controls/google_compute_firewalls_loop.rb @@ -1,6 +1,6 @@ title 'Loop over all GCP Firewalls' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-firewalls-loop-1.0' do diff --git a/test/integration/verify/controls/google_compute_forwarding_rule.rb b/test/integration/verify/controls/google_compute_forwarding_rule.rb index ad2c3c3da..f1f237e87 100644 --- a/test/integration/verify/controls/google_compute_forwarding_rule.rb +++ b/test/integration/verify/controls/google_compute_forwarding_rule.rb @@ -1,28 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_forwarding_rule resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_lb_region = attribute(:gcp_lb_region, default: 'gcp_lb_region', description: 'The region used for the forwarding rule.') -gcp_fr_udp_name = attribute(:gcp_fr_udp_name, default: 'gcp_fr_udp_name', description: 'The forwarding rule name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_lb_region = input(:gcp_lb_region, value: '', description: 'The region used for the forwarding rule.') +gcp_fr_udp_name = input(:gcp_fr_udp_name, value: '', description: 'The forwarding rule name.') control 'google_compute_forwarding_rule-1.0' do impact 1.0 title 'google_compute_forwarding_rule resource test' - describe google_compute_forwarding_rule(project: gcp_project_id, region: gcp_lb_region, name: "#{gcp_fr_udp_name}-500") do it { should exist } its('region') { should match gcp_lb_region } diff --git a/test/integration/verify/controls/google_compute_forwarding_rules.rb b/test/integration/verify/controls/google_compute_forwarding_rules.rb index 024a7dd9f..443983195 100644 --- a/test/integration/verify/controls/google_compute_forwarding_rules.rb +++ b/test/integration/verify/controls/google_compute_forwarding_rules.rb @@ -1,28 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_forwarding_rules resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_lb_region = attribute(:gcp_lb_region, default: 'gcp_lb_region', description: 'The region used for the forwarding rule.') -gcp_fr_udp_name = attribute(:gcp_fr_udp_name, default: 'gcp_fr_udp_name', description: 'The forwarding rule name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_lb_region = input(:gcp_lb_region, value: '', description: 'The region used for the forwarding rule.') +gcp_fr_udp_name = input(:gcp_fr_udp_name, value: '', description: 'The forwarding rule name.') control 'google_compute_forwarding_rules-1.0' do impact 1.0 title 'google_compute_forwarding_rules resource test' - describe google_compute_forwarding_rules(project: gcp_project_id, region: gcp_lb_region) do its('forwarding_rule_names') { should include "#{gcp_fr_udp_name}-500" } end diff --git a/test/integration/verify/controls/google_compute_global_address.rb b/test/integration/verify/controls/google_compute_global_address.rb index 9af08a8b3..f841729a8 100644 --- a/test/integration/verify/controls/google_compute_global_address.rb +++ b/test/integration/verify/controls/google_compute_global_address.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_global_address resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -global_address = attribute('global_address', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +global_address = input('global_address', value: { "name": "inspec-gcp-global-address", "ip_version": "IPV6" }, description: 'Compute Global Address definition') + control 'google_compute_global_address-1.0' do impact 1.0 title 'google_compute_global_address resource test' diff --git a/test/integration/verify/controls/google_compute_global_addresses.rb b/test/integration/verify/controls/google_compute_global_addresses.rb index d63e225f2..cb68155c2 100644 --- a/test/integration/verify/controls/google_compute_global_addresses.rb +++ b/test/integration/verify/controls/google_compute_global_addresses.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_global_addresses resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -global_address = attribute('global_address', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +global_address = input('global_address', value: { "name": "inspec-gcp-global-address", "ip_version": "IPV6" }, description: 'Compute Global Address definition') + control 'google_compute_global_addresses-1.0' do impact 1.0 title 'google_compute_global_addresses resource test' diff --git a/test/integration/verify/controls/google_compute_global_forwarding_rule.rb b/test/integration/verify/controls/google_compute_global_forwarding_rule.rb index 257f83960..31333ad91 100644 --- a/test/integration/verify/controls/google_compute_global_forwarding_rule.rb +++ b/test/integration/verify/controls/google_compute_global_forwarding_rule.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_global_forwarding_rule resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -global_forwarding_rule = attribute('global_forwarding_rule', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +global_forwarding_rule = input('global_forwarding_rule', value: { "name": "inspec-gcp-global-forwarding-rule", "port_range": "80-80" }, description: 'Compute global forwarding rule definition') + control 'google_compute_global_forwarding_rule-1.0' do impact 1.0 title 'google_compute_global_forwarding_rule resource test' diff --git a/test/integration/verify/controls/google_compute_global_forwarding_rules.rb b/test/integration/verify/controls/google_compute_global_forwarding_rules.rb index 17902fac9..d81976460 100644 --- a/test/integration/verify/controls/google_compute_global_forwarding_rules.rb +++ b/test/integration/verify/controls/google_compute_global_forwarding_rules.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_global_forwarding_rules resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -global_forwarding_rule = attribute('global_forwarding_rule', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +global_forwarding_rule = input('global_forwarding_rule', value: { "name": "inspec-gcp-global-forwarding-rule", "port_range": "80-80" }, description: 'Compute global forwarding rule definition') + control 'google_compute_global_forwarding_rules-1.0' do impact 1.0 title 'google_compute_global_forwarding_rules resource test' diff --git a/test/integration/verify/controls/google_compute_global_operation.rb b/test/integration/verify/controls/google_compute_global_operation.rb index f12c8dd3b..63d5487b3 100644 --- a/test/integration/verify/controls/google_compute_global_operation.rb +++ b/test/integration/verify/controls/google_compute_global_operation.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_global_operation resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -global_operation = attribute('global_operation', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +global_operation = input('global_operation', value: { "name": "operation-1635274037755-5cf45e8217d56-c081cd9a-c3ea7346", "operationType": "compute.externalVpnGateways.delete" }, description: 'Global operation rule definition') + control 'google_compute_global_operation-1.0' do impact 1.0 title 'google_compute_global_operation resource test' diff --git a/test/integration/verify/controls/google_compute_global_operations.rb b/test/integration/verify/controls/google_compute_global_operations.rb index 4245464cb..8ccad3f11 100644 --- a/test/integration/verify/controls/google_compute_global_operations.rb +++ b/test/integration/verify/controls/google_compute_global_operations.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_global_operations resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -global_operation = attribute('global_operation', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +global_operation = input('global_operation', value: { "name": "operation-1634799391539-5ced765030229-be5d5765-6623920f", "operationType": "compute.externalVpnGateways.delete" }, description: 'Global operation rule definition') + control 'google_compute_global_operations-1.0' do impact 1.0 title 'google_compute_global_operations resource test' diff --git a/test/integration/verify/controls/google_compute_health_check.rb b/test/integration/verify/controls/google_compute_health_check.rb index 2b64c09de..5f58391b7 100644 --- a/test/integration/verify/controls/google_compute_health_check.rb +++ b/test/integration/verify/controls/google_compute_health_check.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_health_check resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -health_check = attribute('health_check', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +health_check = input('health_check', value: { "name": "inspec-gcp-health-check", "timeout_sec": 10, "check_interval_sec": 10, "tcp_health_check_port": 80 }, description: 'Health check definition') + control 'google_compute_health_check-1.0' do impact 1.0 title 'google_compute_health_check resource test' diff --git a/test/integration/verify/controls/google_compute_health_checks.rb b/test/integration/verify/controls/google_compute_health_checks.rb index 90da22336..6c7006541 100644 --- a/test/integration/verify/controls/google_compute_health_checks.rb +++ b/test/integration/verify/controls/google_compute_health_checks.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_health_checks resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -health_check = attribute('health_check', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +health_check = input('health_check', value: { "name": "inspec-gcp-health-check", "timeout_sec": 10, "check_interval_sec": 10, "tcp_health_check_port": 80 }, description: 'Health check definition') + control 'google_compute_health_checks-1.0' do impact 1.0 title 'google_compute_health_checks resource test' diff --git a/test/integration/verify/controls/google_compute_http_health_check.rb b/test/integration/verify/controls/google_compute_http_health_check.rb index 0539503b9..a856a5bdd 100644 --- a/test/integration/verify/controls/google_compute_http_health_check.rb +++ b/test/integration/verify/controls/google_compute_http_health_check.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_http_health_check resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -http_health_check = attribute('http_health_check', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +http_health_check = input('http_health_check', value: { "name": "inspec-gcp-http-health-check", "request_path": "/health_check", "timeout_sec": 20, "check_interval_sec": 20 }, description: 'HTTP health check definition') + control 'google_compute_http_health_check-1.0' do impact 1.0 title 'google_compute_http_health_check resource test' diff --git a/test/integration/verify/controls/google_compute_http_health_checks.rb b/test/integration/verify/controls/google_compute_http_health_checks.rb index e8894c15d..c43e9d4d0 100644 --- a/test/integration/verify/controls/google_compute_http_health_checks.rb +++ b/test/integration/verify/controls/google_compute_http_health_checks.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_http_health_checks resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -http_health_check = attribute('http_health_check', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +http_health_check = input('http_health_check', value: { "name": "inspec-gcp-http-health-check", "request_path": "/health_check", "timeout_sec": 20, "check_interval_sec": 20 }, description: 'HTTP health check definition') + control 'google_compute_http_health_checks-1.0' do impact 1.0 title 'google_compute_http_health_checks resource test' diff --git a/test/integration/verify/controls/google_compute_https_health_check.rb b/test/integration/verify/controls/google_compute_https_health_check.rb index 395f0583f..ebe193a96 100644 --- a/test/integration/verify/controls/google_compute_https_health_check.rb +++ b/test/integration/verify/controls/google_compute_https_health_check.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_https_health_check resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -https_health_check = attribute('https_health_check', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +https_health_check = input('https_health_check', value: { "name": "inspec-gcp-https-health-check", "request_path": "/https_health_check", "timeout_sec": 15, "check_interval_sec": 15, "unhealthy_threshold": 3 }, description: 'HTTPS health check definition') + control 'google_compute_https_health_check-1.0' do impact 1.0 title 'google_compute_https_health_check resource test' diff --git a/test/integration/verify/controls/google_compute_https_health_checks.rb b/test/integration/verify/controls/google_compute_https_health_checks.rb index 2e191ce50..04628fbdb 100644 --- a/test/integration/verify/controls/google_compute_https_health_checks.rb +++ b/test/integration/verify/controls/google_compute_https_health_checks.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_https_health_checks resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -https_health_check = attribute('https_health_check', default: { +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +https_health_check = input('https_health_check', value: { "name": "inspec-gcp-https-health-check", "request_path": "/https_health_check", "timeout_sec": 15, "check_interval_sec": 15, "unhealthy_threshold": 3 }, description: 'HTTPS health check definition') + control 'google_compute_https_health_checks-1.0' do impact 1.0 title 'google_compute_https_health_checks resource test' diff --git a/test/integration/verify/controls/google_compute_image.rb b/test/integration/verify/controls/google_compute_image.rb index 4f564fa6d..4062c3f57 100644 --- a/test/integration/verify/controls/google_compute_image.rb +++ b/test/integration/verify/controls/google_compute_image.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_image resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -compute_image = attribute('compute_image', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +compute_image = input('compute_image', value: { "name": "inspec-image", "source": "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz" }, description: 'Compute image description') + control 'google_compute_image-1.0' do impact 1.0 title 'google_compute_image resource test' diff --git a/test/integration/verify/controls/google_compute_image_family_view.rb b/test/integration/verify/controls/google_compute_image_family_view.rb index 183e99c0d..ca78176f3 100644 --- a/test/integration/verify/controls/google_compute_image_family_view.rb +++ b/test/integration/verify/controls/google_compute_image_family_view.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_image_family_view resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -image_family_views = attribute('image_family_views', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +image_family_views = input('image_family_views', value: { "zone": "us-central1-c", "name": "image-1", "source_type": "RAW", @@ -24,6 +10,7 @@ "disk_size_gb": 3, "family": "test" }, description: 'Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.') + control 'google_compute_image_family_view-1.0' do impact 1.0 title 'google_compute_image_family_view resource test' diff --git a/test/integration/verify/controls/google_compute_instance.rb b/test/integration/verify/controls/google_compute_instance.rb index c93f42288..4fb349b72 100644 --- a/test/integration/verify/controls/google_compute_instance.rb +++ b/test/integration/verify/controls/google_compute_instance.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name of the compute disk') -instance = attribute('instance', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name of the compute disk') +instance = input('instance', value: { "name": "inspec-instance", "machine_type": "n1-standard-1", "tag_1": "foo", @@ -26,11 +12,11 @@ "sa_scope": "https://www.googleapis.com/auth/compute.readonly", "startup_script": "echo hi > /test.txt" }, description: 'Compute instance description') + control 'google_compute_instance-1.0' do impact 1.0 title 'google_compute_instance resource test' - describe google_compute_instance(project: gcp_project_id, zone: gcp_zone, name: instance['name']) do it { should exist } its('machine_type') { should match instance['machine_type'] } diff --git a/test/integration/verify/controls/google_compute_instance_group.rb b/test/integration/verify/controls/google_compute_instance_group.rb index 75dd15f08..a110c55fb 100644 --- a/test/integration/verify/controls/google_compute_instance_group.rb +++ b/test/integration/verify/controls/google_compute_instance_group.rb @@ -1,32 +1,18 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance_group resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name') -instance_group = attribute('instance_group', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name') +instance_group = input('instance_group', value: { "name": "inspec-instance-group", "description": "My instance group for testing", "named_port_name": "https", "named_port_port": 8080 }, description: 'Instance group') + control 'google_compute_instance_group-1.0' do impact 1.0 title 'google_compute_instance_group resource test' - describe google_compute_instance_group(project: gcp_project_id, zone: gcp_zone, name: instance_group['name']) do it { should exist } its('description') { should cmp instance_group['description'] } diff --git a/test/integration/verify/controls/google_compute_instance_group_manager.rb b/test/integration/verify/controls/google_compute_instance_group_manager.rb index 97fe22881..62b701155 100644 --- a/test/integration/verify/controls/google_compute_instance_group_manager.rb +++ b/test/integration/verify/controls/google_compute_instance_group_manager.rb @@ -1,34 +1,20 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance_group_manager resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP project zone.') -instance_group_manager = attribute('instance_group_manager', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP project zone.') +instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') + control 'google_compute_instance_group_manager-1.0' do impact 1.0 title 'google_compute_instance_group_manager resource test' describe google_compute_instance_group_manager(project: gcp_project_id, zone: gcp_zone, name: instance_group_manager['name']) do it { should exist } - its('base_instance_name') { should eq instance_group_manager['base_instance_name'] } its('named_ports.count') { should cmp 1 } its('named_ports.first.name') { should eq instance_group_manager['named_port_name'] } diff --git a/test/integration/verify/controls/google_compute_instance_group_managers.rb b/test/integration/verify/controls/google_compute_instance_group_managers.rb index fdd35ac41..4a6adfa73 100644 --- a/test/integration/verify/controls/google_compute_instance_group_managers.rb +++ b/test/integration/verify/controls/google_compute_instance_group_managers.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance_group_managers resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP project zone.') -instance_group_manager = attribute('instance_group_manager', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP project zone.') +instance_group_manager = input('instance_group_manager', value: { "name": "inspec-gcp-igm", "base_instance_name": "igm", "named_port_name": "port", "named_port_port": 80 }, description: 'Instance group manager definition') + control 'google_compute_instance_group_managers-1.0' do impact 1.0 title 'google_compute_instance_group_managers resource test' diff --git a/test/integration/verify/controls/google_compute_instance_groups.rb b/test/integration/verify/controls/google_compute_instance_groups.rb index d87c864fa..29bb98247 100644 --- a/test/integration/verify/controls/google_compute_instance_groups.rb +++ b/test/integration/verify/controls/google_compute_instance_groups.rb @@ -1,32 +1,18 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance_groups resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name') -instance_group = attribute('instance_group', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name') +instance_group = input('instance_group', value: { "name": "inspec-instance-group", "description": "My instance group for testing", "named_port_name": "https", "named_port_port": 8080 }, description: 'Instance group') + control 'google_compute_instance_groups-1.0' do impact 1.0 title 'google_compute_instance_groups resource test' - describe google_compute_instance_groups(project: gcp_project_id, zone: gcp_zone) do its('instance_group_names') { should include instance_group['name'] } end diff --git a/test/integration/verify/controls/google_compute_instance_groups_loop.rb b/test/integration/verify/controls/google_compute_instance_groups_loop.rb index c7586806a..eb7664566 100644 --- a/test/integration/verify/controls/google_compute_instance_groups_loop.rb +++ b/test/integration/verify/controls/google_compute_instance_groups_loop.rb @@ -1,10 +1,9 @@ title 'Google compute instance groups properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_lb_zone = attribute(:gcp_lb_zone, default: '', description: 'The GCP pattern zone for the managed instance group (mig1).') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_lb_zone = input(:gcp_lb_zone, value: '', description: 'The GCP pattern zone for the managed instance group (mig1).') control 'gcp-compute-instance-groups-loop-1.0' do - impact 1.0 title 'Ensure compute instance groups have the correct properties by looping in detail and filtering' diff --git a/test/integration/verify/controls/google_compute_instance_label_loop.rb b/test/integration/verify/controls/google_compute_instance_label_loop.rb index 1ccc914ab..26733caac 100644 --- a/test/integration/verify/controls/google_compute_instance_label_loop.rb +++ b/test/integration/verify/controls/google_compute_instance_label_loop.rb @@ -1,9 +1,8 @@ title 'Loop over all GCP Zones to find all Compute Instances with a particular Label' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-zones-compute-label-loop-1.0' do - impact 1.0 title 'Ensure labels for compute instances across all zones have or do not have a particular label.' diff --git a/test/integration/verify/controls/google_compute_instance_template.rb b/test/integration/verify/controls/google_compute_instance_template.rb index 32e55128b..e2818ac2d 100644 --- a/test/integration/verify/controls/google_compute_instance_template.rb +++ b/test/integration/verify/controls/google_compute_instance_template.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance_template resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -instance_template = attribute('instance_template', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +instance_template = input('instance_template', value: { "name": "inspec-gcp-instance-template", "description": "A description of the instance template", "instance_description": "A description of the instance itself", @@ -30,6 +16,7 @@ "network_interface_network": "default", "service_account_scope": "storage-ro" }, description: 'An instance template definition') + control 'google_compute_instance_template-1.0' do impact 1.0 title 'google_compute_instance_template resource test' diff --git a/test/integration/verify/controls/google_compute_instance_templates.rb b/test/integration/verify/controls/google_compute_instance_templates.rb index e2702203a..05925713b 100644 --- a/test/integration/verify/controls/google_compute_instance_templates.rb +++ b/test/integration/verify/controls/google_compute_instance_templates.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instance_templates resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -instance_template = attribute('instance_template', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +instance_template = input('instance_template', value: { "name": "inspec-gcp-instance-template", "description": "A description of the instance template", "instance_description": "A description of the instance itself", @@ -30,6 +16,7 @@ "network_interface_network": "default", "service_account_scope": "storage-ro" }, description: 'An instance template definition') + control 'google_compute_instance_templates-1.0' do impact 1.0 title 'google_compute_instance_templates resource test' diff --git a/test/integration/verify/controls/google_compute_instances.rb b/test/integration/verify/controls/google_compute_instances.rb index 4df008d56..94f63bf06 100644 --- a/test/integration/verify/controls/google_compute_instances.rb +++ b/test/integration/verify/controls/google_compute_instances.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_instances resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name of the compute disk') -instance = attribute('instance', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name of the compute disk') +instance = input('instance', value: { "name": "inspec-instance", "machine_type": "n1-standard-1", "tag_1": "foo", @@ -26,11 +12,11 @@ "sa_scope": "https://www.googleapis.com/auth/compute.readonly", "startup_script": "echo hi > /test.txt" }, description: 'Compute instance description') + control 'google_compute_instances-1.0' do impact 1.0 title 'google_compute_instances resource test' - describe google_compute_instances(project: gcp_project_id, zone: gcp_zone) do its('instance_names') { should include instance['name'] } end diff --git a/test/integration/verify/controls/google_compute_interconnect_location.rb b/test/integration/verify/controls/google_compute_interconnect_location.rb index ca11850ad..8b5322bdf 100644 --- a/test/integration/verify/controls/google_compute_interconnect_location.rb +++ b/test/integration/verify/controls/google_compute_interconnect_location.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_interconnect_location resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -interconnect_location = attribute('interconnect_location', default: { +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +interconnect_location = input('interconnect_location', value: { "name": "akl-zone1-1353", "facility_provider_facility_id": "Auckland - Albany", "facility_provider": "Vocus" }, description: 'Retrieves the list of interconnect locations available to the specified project.') + control 'google_compute_interconnect_location-1.0' do impact 1.0 title 'google_compute_interconnect_location resource test' diff --git a/test/integration/verify/controls/google_compute_interconnect_locations.rb b/test/integration/verify/controls/google_compute_interconnect_locations.rb index d5cf30ee4..6f6d9e1c2 100644 --- a/test/integration/verify/controls/google_compute_interconnect_locations.rb +++ b/test/integration/verify/controls/google_compute_interconnect_locations.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_interconnect_locations resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -interconnect_location = attribute('interconnect_location', default: { +gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') +interconnect_location = input('interconnect_location', value: { "name": "akl-zone1-1353", "facility_provider_facility_id": "Auckland - Albany", "facility_provider": "Vocus" }, description: 'Retrieves the list of interconnect locations available to the specified project.') + control 'google_compute_interconnect_locations-1.0' do impact 1.0 title 'google_compute_interconnect_locations resource test' diff --git a/test/integration/verify/controls/google_compute_license_code.rb b/test/integration/verify/controls/google_compute_license_code.rb index 05569c2f8..a7d7610ca 100644 --- a/test/integration/verify/controls/google_compute_license_code.rb +++ b/test/integration/verify/controls/google_compute_license_code.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_license_code resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -license_code = attribute('license_code', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +license_code = input('license_code', value: { "name": "akl-zone1-1353" }, description: 'License codes are mirrored across all projects that have permissions to read the License Code.') + control 'google_compute_license_code-1.0' do impact 1.0 title 'google_compute_license_code resource test' diff --git a/test/integration/verify/controls/google_compute_network.rb b/test/integration/verify/controls/google_compute_network.rb index f0114d466..c15505f27 100644 --- a/test/integration/verify/controls/google_compute_network.rb +++ b/test/integration/verify/controls/google_compute_network.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_network resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -network = attribute('network', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +network = input('network', value: { "name": "inspec-network", "routing_mode": "REGIONAL" }, description: 'Network description') + control 'google_compute_network-1.0' do impact 1.0 title 'google_compute_network resource test' diff --git a/test/integration/verify/controls/google_compute_network_endpoint_group.rb b/test/integration/verify/controls/google_compute_network_endpoint_group.rb index 7eb2602e1..ed1fb0ec2 100644 --- a/test/integration/verify/controls/google_compute_network_endpoint_group.rb +++ b/test/integration/verify/controls/google_compute_network_endpoint_group.rb @@ -1,30 +1,16 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_network_endpoint_group resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -network_endpoint_group = attribute('network_endpoint_group', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +network_endpoint_group = input('network_endpoint_group', value: { "name": "inspec-gcp-endpoint-group", "default_port": 90 }, description: 'Network endpoint group description') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name') + control 'google_compute_network_endpoint_group-1.0' do impact 1.0 title 'google_compute_network_endpoint_group resource test' - describe google_compute_network_endpoint_group(project: gcp_project_id, zone: gcp_zone, name: network_endpoint_group['name']) do it { should exist } its('default_port') { should cmp network_endpoint_group['default_port'] } diff --git a/test/integration/verify/controls/google_compute_network_endpoint_groups.rb b/test/integration/verify/controls/google_compute_network_endpoint_groups.rb index 78f615273..31e0f7de6 100644 --- a/test/integration/verify/controls/google_compute_network_endpoint_groups.rb +++ b/test/integration/verify/controls/google_compute_network_endpoint_groups.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_network_endpoint_groups resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -network_endpoint_group = attribute('network_endpoint_group', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +network_endpoint_group = input('network_endpoint_group', value: { "name": "inspec-gcp-endpoint-group", "default_port": 90 }, description: 'Network endpoint group description') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name') + control 'google_compute_network_endpoint_groups-1.0' do impact 1.0 title 'google_compute_network_endpoint_groups resource test' diff --git a/test/integration/verify/controls/google_compute_networks.rb b/test/integration/verify/controls/google_compute_networks.rb index 306042255..f3727ee94 100644 --- a/test/integration/verify/controls/google_compute_networks.rb +++ b/test/integration/verify/controls/google_compute_networks.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_networks resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -network = attribute('network', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +network = input('network', value: { "name": "inspec-network", "routing_mode": "REGIONAL" }, description: 'Network description') + control 'google_compute_networks-1.0' do impact 1.0 title 'google_compute_networks resource test' diff --git a/test/integration/verify/controls/google_compute_node_group.rb b/test/integration/verify/controls/google_compute_node_group.rb index d464cb564..b523c744d 100644 --- a/test/integration/verify/controls/google_compute_node_group.rb +++ b/test/integration/verify/controls/google_compute_node_group.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_node_group resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -node_group = attribute('node_group', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +node_group = input('node_group', value: { "name": "inspec-node-group", "description": "A description of the node group", "size": 0 }, description: 'Node group description') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name') + control 'google_compute_node_group-1.0' do impact 1.0 title 'google_compute_node_group resource test' diff --git a/test/integration/verify/controls/google_compute_node_groups.rb b/test/integration/verify/controls/google_compute_node_groups.rb index 9a8c596e3..bbe3e24d4 100644 --- a/test/integration/verify/controls/google_compute_node_groups.rb +++ b/test/integration/verify/controls/google_compute_node_groups.rb @@ -1,31 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_node_groups resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -node_group = attribute('node_group', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +node_group = input('node_group', value: { "name": "inspec-node-group", "description": "A description of the node group", "size": 0 }, description: 'Node group description') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name') +gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name') + control 'google_compute_node_groups-1.0' do impact 1.0 title 'google_compute_node_groups resource test' - describe google_compute_node_groups(project: gcp_project_id, zone: gcp_zone) do it { should exist } its('descriptions') { should include node_group['description'] } diff --git a/test/integration/verify/controls/google_compute_node_template.rb b/test/integration/verify/controls/google_compute_node_template.rb index c44376914..b73fce706 100644 --- a/test/integration/verify/controls/google_compute_node_template.rb +++ b/test/integration/verify/controls/google_compute_node_template.rb @@ -1,31 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_node_template resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -node_template = attribute('node_template', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +node_template = input('node_template', value: { "name": "inspec-node-template", "label_key": "key", "label_value": "value" }, description: 'Node template description') + control 'google_compute_node_template-1.0' do impact 1.0 title 'google_compute_node_template resource test' - describe google_compute_node_template(project: gcp_project_id, region: gcp_location, name: node_template['name']) do it { should exist } its('node_affinity_labels') { should include(node_template['label_key'] => node_template['label_value']) } diff --git a/test/integration/verify/controls/google_compute_node_templates.rb b/test/integration/verify/controls/google_compute_node_templates.rb index 349514c47..a5bf6fef4 100644 --- a/test/integration/verify/controls/google_compute_node_templates.rb +++ b/test/integration/verify/controls/google_compute_node_templates.rb @@ -1,31 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_node_templates resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -node_template = attribute('node_template', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +node_template = input('node_template', value: { "name": "inspec-node-template", "label_key": "key", "label_value": "value" }, description: 'Node template description') + control 'google_compute_node_templates-1.0' do impact 1.0 title 'google_compute_node_templates resource test' - describe google_compute_node_templates(project: gcp_project_id, region: gcp_location) do its('names') { should include node_template['name'] } end diff --git a/test/integration/verify/controls/google_compute_project_info.rb b/test/integration/verify/controls/google_compute_project_info.rb index 74be711dc..ca6d71aa1 100644 --- a/test/integration/verify/controls/google_compute_project_info.rb +++ b/test/integration/verify/controls/google_compute_project_info.rb @@ -1,20 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_project_info resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') + control 'google_compute_project_info-1.0' do impact 1.0 title 'google_compute_project_info resource test' diff --git a/test/integration/verify/controls/google_compute_region.rb b/test/integration/verify/controls/google_compute_region.rb index eaaf8fb22..0791fbb6f 100644 --- a/test/integration/verify/controls/google_compute_region.rb +++ b/test/integration/verify/controls/google_compute_region.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') + control 'google_compute_region-1.0' do impact 1.0 title 'google_compute_region resource test' diff --git a/test/integration/verify/controls/google_compute_region_backend_service.rb b/test/integration/verify/controls/google_compute_region_backend_service.rb index 747d64f09..566bca5cd 100644 --- a/test/integration/verify/controls/google_compute_region_backend_service.rb +++ b/test/integration/verify/controls/google_compute_region_backend_service.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region_backend_service resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -region_backend_service = attribute('region_backend_service', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +region_backend_service = input('region_backend_service', value: { "name": "inspec-gcp-region-backend-service", "description": "A regional description", "protocol": "TCP", "timeout_sec": 15 }, description: 'Backend service definition') + control 'google_compute_region_backend_service-1.0' do impact 1.0 title 'google_compute_region_backend_service resource test' diff --git a/test/integration/verify/controls/google_compute_region_backend_services.rb b/test/integration/verify/controls/google_compute_region_backend_services.rb index dba64a598..735b0e516 100644 --- a/test/integration/verify/controls/google_compute_region_backend_services.rb +++ b/test/integration/verify/controls/google_compute_region_backend_services.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region_backend_services resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -region_backend_service = attribute('region_backend_service', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +region_backend_service = input('region_backend_service', value: { "name": "inspec-gcp-region-backend-service", "description": "A regional description", "protocol": "TCP", "timeout_sec": 15 }, description: 'Backend service definition') + control 'google_compute_region_backend_services-1.0' do impact 1.0 title 'google_compute_region_backend_services resource test' diff --git a/test/integration/verify/controls/google_compute_region_instance_group_manager.rb b/test/integration/verify/controls/google_compute_region_instance_group_manager.rb index 85758b5bb..e474480a8 100644 --- a/test/integration/verify/controls/google_compute_region_instance_group_manager.rb +++ b/test/integration/verify/controls/google_compute_region_instance_group_manager.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region_instance_group_manager resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -rigm = attribute('rigm', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +rigm = input('rigm', value: { "name": "inspec-rigm", "base_instance_name": "rigm1", "target_size": 1, @@ -24,6 +10,7 @@ "named_port_port": 8888, "healing_delay": 300 }, description: 'Compute region instance group manager description') + control 'google_compute_region_instance_group_manager-1.0' do impact 1.0 title 'google_compute_region_instance_group_manager resource test' diff --git a/test/integration/verify/controls/google_compute_region_instance_group_managers.rb b/test/integration/verify/controls/google_compute_region_instance_group_managers.rb index b200f7a73..3f884b614 100644 --- a/test/integration/verify/controls/google_compute_region_instance_group_managers.rb +++ b/test/integration/verify/controls/google_compute_region_instance_group_managers.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region_instance_group_managers resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -rigm = attribute('rigm', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +rigm = input('rigm', value: { "name": "inspec-rigm", "base_instance_name": "rigm1", "target_size": 1, @@ -24,6 +10,7 @@ "named_port_port": 8888, "healing_delay": 300 }, description: 'Compute region instance group manager description') + control 'google_compute_region_instance_group_managers-1.0' do impact 1.0 title 'google_compute_region_instance_group_managers resource test' diff --git a/test/integration/verify/controls/google_compute_region_operation.rb b/test/integration/verify/controls/google_compute_region_operation.rb index 16d4537b7..2a9774dc2 100644 --- a/test/integration/verify/controls/google_compute_region_operation.rb +++ b/test/integration/verify/controls/google_compute_region_operation.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region_operation resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -region_operation = attribute('region_operation', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +region_operation = input('region_operation', value: { "name": "operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5", "region": "us-central1", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified region') + control 'google_compute_region_operation-1.0' do impact 1.0 title 'google_compute_region_operation resource test' diff --git a/test/integration/verify/controls/google_compute_region_operations.rb b/test/integration/verify/controls/google_compute_region_operations.rb index 021a2d0ef..660fedb02 100644 --- a/test/integration/verify/controls/google_compute_region_operations.rb +++ b/test/integration/verify/controls/google_compute_region_operations.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_region_operations resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -region_operation = attribute('region_operation', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +region_operation = input('region_operation', value: { "name": "operation-1641188435323-5d4a6f5b26934-9281422c-dce238f5", "region": "us-central1", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified region') + control 'google_compute_region_operations-1.0' do impact 1.0 title 'google_compute_region_operations resource test' diff --git a/test/integration/verify/controls/google_compute_region_zones_loop.rb b/test/integration/verify/controls/google_compute_region_zones_loop.rb index 8d69b1cbc..d1ee22071 100644 --- a/test/integration/verify/controls/google_compute_region_zones_loop.rb +++ b/test/integration/verify/controls/google_compute_region_zones_loop.rb @@ -1,10 +1,9 @@ title 'Loop over all zones in a GCP region' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_region = attribute(:gcp_location, default: '', description: 'The GCP region being used.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_region = input(:gcp_location, value: '', description: 'The GCP region being used.') control 'gcp-region-zones-loop-1.0' do - impact 1.0 title 'Ensure all zones in a region are available using google_compute_zone for detail.' diff --git a/test/integration/verify/controls/google_compute_regional_disk.rb b/test/integration/verify/controls/google_compute_regional_disk.rb index 082626b19..9fb7cdb8e 100644 --- a/test/integration/verify/controls/google_compute_regional_disk.rb +++ b/test/integration/verify/controls/google_compute_regional_disk.rb @@ -1,9 +1,10 @@ title 'Test GCP google_compute_regional_disk resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_region = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -gcp_compute_disk_name = attribute(:gcp_compute_disk_name, default: 'gcp_compute_disk_name', description: 'GCP Compute disk name.') -gcp_compute_disk_type = attribute(:gcp_compute_disk_type, default: 'gcp_compute_disk_type', description: 'GCP Compute disk type.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_region = input(:gcp_location, value: '', description: 'The GCP project region.') +gcp_compute_disk_name = input(:gcp_compute_disk_name, value: '', description: 'GCP Compute disk name.') +gcp_compute_disk_type = input(:gcp_compute_disk_type, value: '', description: 'GCP Compute disk type.') + control 'google_compute_regional_disk-1.0' do impact 1.0 title 'google_compute_regional_disk resource test' diff --git a/test/integration/verify/controls/google_compute_regions.rb b/test/integration/verify/controls/google_compute_regions.rb index 129f3fe84..de67bce33 100644 --- a/test/integration/verify/controls/google_compute_regions.rb +++ b/test/integration/verify/controls/google_compute_regions.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_regions resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') control 'google_compute_regions-1.0' do impact 1.0 title 'google_compute_regions resource test' diff --git a/test/integration/verify/controls/google_compute_regions_loop.rb b/test/integration/verify/controls/google_compute_regions_loop.rb index 3cbf286f7..1fd9a9d6e 100644 --- a/test/integration/verify/controls/google_compute_regions_loop.rb +++ b/test/integration/verify/controls/google_compute_regions_loop.rb @@ -1,15 +1,14 @@ title 'Loop over all GCP Regions' - gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') - control 'gcp-regions-loop-1.0' do +control 'gcp-regions-loop-1.0' do + impact 1.0 + title 'Ensure regions have the correct properties in bulk using google_compute_region for detail.' - impact 1.0 - title 'Ensure regions have the correct properties in bulk using google_compute_region for detail.' - - google_compute_regions(project: gcp_project_id).region_names.each do |region_name| - describe google_compute_region(project: gcp_project_id, name: region_name) do - it { should be_up } - end + google_compute_regions(project: gcp_project_id).region_names.each do |region_name| + describe google_compute_region(project: gcp_project_id, name: region_name) do + it { should be_up } end - end \ No newline at end of file + end +end \ No newline at end of file diff --git a/test/integration/verify/controls/google_compute_route.rb b/test/integration/verify/controls/google_compute_route.rb index 7792f1816..2be0bcd68 100644 --- a/test/integration/verify/controls/google_compute_route.rb +++ b/test/integration/verify/controls/google_compute_route.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_route resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -route = attribute('route', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +route = input('route', value: { "name": "inspec-gcp-route", "dest_range": "15.0.0.0/24", "next_hop_ip": "10.2.0.1", "priority": 100 }, description: 'Compute route description') -gcp_network_name = attribute(:gcp_network_name, default: 'gcp_network_name', description: 'GCP network name') +gcp_network_name = input(:gcp_network_name, value: '', description: 'GCP network name') + control 'google_compute_route-1.0' do impact 1.0 title 'google_compute_route resource test' diff --git a/test/integration/verify/controls/google_compute_router.rb b/test/integration/verify/controls/google_compute_router.rb index 0f9eeb9dc..98f3a89bb 100644 --- a/test/integration/verify/controls/google_compute_router.rb +++ b/test/integration/verify/controls/google_compute_router.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_router resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -router = attribute('router', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", @@ -24,7 +10,8 @@ "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') -gcp_network_name = attribute(:gcp_network_name, default: 'gcp_network_name', description: 'GCP network name') +gcp_network_name = input(:gcp_network_name, value: '', description: 'GCP network name') + control 'google_compute_router-1.0' do impact 1.0 title 'google_compute_router resource test' diff --git a/test/integration/verify/controls/google_compute_router_nat.rb b/test/integration/verify/controls/google_compute_router_nat.rb index 6bd07f2be..a915422c0 100644 --- a/test/integration/verify/controls/google_compute_router_nat.rb +++ b/test/integration/verify/controls/google_compute_router_nat.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_router_nat resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -router = attribute('router', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", @@ -24,7 +10,7 @@ "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') -router_nat = attribute('router_nat', default: { +router_nat = input('router_nat', value: { "name": "inspec-router-nat", "nat_ip_allocate_option": "AUTO_ONLY", "source_subnetwork_ip_ranges_to_nat": "ALL_SUBNETWORKS_ALL_IP_RANGES", diff --git a/test/integration/verify/controls/google_compute_router_nats.rb b/test/integration/verify/controls/google_compute_router_nats.rb index b0d46eaff..5e66d3923 100644 --- a/test/integration/verify/controls/google_compute_router_nats.rb +++ b/test/integration/verify/controls/google_compute_router_nats.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_router_nats resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -router = attribute('router', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", @@ -24,7 +10,7 @@ "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') -router_nat = attribute('router_nat', default: { +router_nat = input('router_nat', value: { "name": "inspec-router-nat", "nat_ip_allocate_option": "AUTO_ONLY", "source_subnetwork_ip_ranges_to_nat": "ALL_SUBNETWORKS_ALL_IP_RANGES", diff --git a/test/integration/verify/controls/google_compute_routers.rb b/test/integration/verify/controls/google_compute_routers.rb index 6c5347046..365b7c519 100644 --- a/test/integration/verify/controls/google_compute_routers.rb +++ b/test/integration/verify/controls/google_compute_routers.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_routers resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -router = attribute('router', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +router = input('router', value: { "name": "inspec-gcp-router", "bgp_asn": 64514, "bgp_advertise_mode": "CUSTOM", @@ -24,7 +10,8 @@ "bgp_advertised_ip_range1": "1.2.3.4", "bgp_advertised_ip_range2": "6.7.0.0/16" }, description: 'Compute router description') -gcp_network_name = attribute(:gcp_network_name, default: 'gcp_network_name', description: 'GCP network name') +# gcp_network_name = input(:gcp_network_name, value: '', description: 'GCP network name') + control 'google_compute_routers-1.0' do impact 1.0 title 'google_compute_routers resource test' diff --git a/test/integration/verify/controls/google_compute_routes.rb b/test/integration/verify/controls/google_compute_routes.rb index 29ce688a0..88cb50a01 100644 --- a/test/integration/verify/controls/google_compute_routes.rb +++ b/test/integration/verify/controls/google_compute_routes.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_routes resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -route = attribute('route', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +route = input('route', default: { "name": "inspec-gcp-route", "dest_range": "15.0.0.0/24", "next_hop_ip": "10.2.0.1", "priority": 100 }, description: 'Compute route description') -gcp_network_name = attribute(:gcp_network_name, default: 'gcp_network_name', description: 'GCP network name') +# gcp_network_name = input(:gcp_network_name, value: '', description: 'GCP network name') + control 'google_compute_routes-1.0' do impact 1.0 title 'google_compute_routes resource test' diff --git a/test/integration/verify/controls/google_compute_security_policies.rb b/test/integration/verify/controls/google_compute_security_policies.rb index cbe845b7b..9f8717c18 100644 --- a/test/integration/verify/controls/google_compute_security_policies.rb +++ b/test/integration/verify/controls/google_compute_security_policies.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_security_policies resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -security_policy = attribute('security_policy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +security_policy = input('security_policy', value: { "name": "sec-policy", "action": "deny(403)", "priority": "1000", "ip_range": "9.9.9.0/24", "description": "my description" }, description: 'Security Policy description') + control 'google_compute_security_policies-1.0' do impact 1.0 title 'google_compute_security_policies resource test' diff --git a/test/integration/verify/controls/google_compute_security_policy.rb b/test/integration/verify/controls/google_compute_security_policy.rb index 511b63471..93360c737 100644 --- a/test/integration/verify/controls/google_compute_security_policy.rb +++ b/test/integration/verify/controls/google_compute_security_policy.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_security_policy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -security_policy = attribute('security_policy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +security_policy = input('security_policy', value: { "name": "sec-policy", "action": "deny(403)", "priority": "1000", "ip_range": "9.9.9.0/24", "description": "my description" }, description: 'Security Policy description') + control 'google_compute_security_policy-1.0' do impact 1.0 title 'google_compute_security_policy resource test' diff --git a/test/integration/verify/controls/google_compute_snapshot.rb b/test/integration/verify/controls/google_compute_snapshot.rb index a1c661ccf..17bc17f18 100644 --- a/test/integration/verify/controls/google_compute_snapshot.rb +++ b/test/integration/verify/controls/google_compute_snapshot.rb @@ -1,32 +1,18 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_snapshot resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name of the compute disk') -snapshot = attribute('snapshot', default: { +# gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name of the compute disk') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", "disk_image": "debian-cloud/debian-10-buster-v20191014" }, description: 'Compute disk snapshot description') + control 'google_compute_snapshot-1.0' do impact 1.0 title 'google_compute_snapshot resource test' - describe google_compute_snapshot(project: gcp_project_id, name: snapshot['name']) do it { should exist } its('source_disk') { should match snapshot['disk_name'] } diff --git a/test/integration/verify/controls/google_compute_snapshots.rb b/test/integration/verify/controls/google_compute_snapshots.rb index 491ee3334..230800b7a 100644 --- a/test/integration/verify/controls/google_compute_snapshots.rb +++ b/test/integration/verify/controls/google_compute_snapshots.rb @@ -1,32 +1,18 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_snapshots resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'GCP zone name of the compute disk') -snapshot = attribute('snapshot', default: { +# gcp_zone = input(:gcp_zone, value: '', description: 'GCP zone name of the compute disk') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +snapshot = input('snapshot', value: { "name": "inspec-gcp-disk-snapshot", "disk_name": "inspec-snapshot-disk", "disk_type": "pd-standard", "disk_image": "debian-cloud/debian-10-buster-v20191014" }, description: 'Compute disk snapshot description') + control 'google_compute_snapshots-1.0' do impact 1.0 title 'google_compute_snapshots resource test' - describe google_compute_snapshots(project: gcp_project_id) do its('count') { should be >= 1 } end diff --git a/test/integration/verify/controls/google_compute_ssl_certificate.rb b/test/integration/verify/controls/google_compute_ssl_certificate.rb index dfb45f5d7..f1dec0d92 100644 --- a/test/integration/verify/controls/google_compute_ssl_certificate.rb +++ b/test/integration/verify/controls/google_compute_ssl_certificate.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_ssl_certificate resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -ssl_certificate = attribute('ssl_certificate', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +ssl_certificate = input('ssl_certificate', value: { "name": "inspec-gcp-ssl-certificate", "description": "A fake ssl certificate (DO NOT USE)", "certificate": "-----BEGIN CERTIFICATE-----\nMIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG\nEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT\nBgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm\nb3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN\nAQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2\nMDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP\nBgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM\nFUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z\naXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ\n4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O\nBBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn\n0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O\nM3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ\nzqGNhIPGq2ULqXKK8BY=\n-----END CERTIFICATE-----\n", "private_key": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49\nAwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f\nOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ==\n-----END EC PRIVATE KEY-----\n" }, description: 'A GCP SSL certificate definition') + control 'google_compute_ssl_certificate-1.0' do impact 1.0 title 'google_compute_ssl_certificate resource test' diff --git a/test/integration/verify/controls/google_compute_ssl_certificates.rb b/test/integration/verify/controls/google_compute_ssl_certificates.rb index 2ef9bac7f..46fcd159c 100644 --- a/test/integration/verify/controls/google_compute_ssl_certificates.rb +++ b/test/integration/verify/controls/google_compute_ssl_certificates.rb @@ -1,32 +1,18 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_ssl_certificates resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -ssl_certificate = attribute('ssl_certificate', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +ssl_certificate = input('ssl_certificate', value: { "name": "inspec-gcp-ssl-certificate", "description": "A fake ssl certificate (DO NOT USE)", "certificate": "-----BEGIN CERTIFICATE-----\nMIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG\nEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT\nBgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm\nb3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN\nAQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2\nMDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP\nBgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM\nFUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z\naXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH\nKoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ\n4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O\nBBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn\n0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O\nM3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ\nzqGNhIPGq2ULqXKK8BY=\n-----END CERTIFICATE-----\n", "private_key": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49\nAwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f\nOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ==\n-----END EC PRIVATE KEY-----\n" }, description: 'A GCP SSL certificate definition') + control 'google_compute_ssl_certificates-1.0' do impact 1.0 title 'google_compute_ssl_certificates resource test' describe google_compute_ssl_certificates(project: gcp_project_id) do - its('names') { should include ssl_certificate['name'] } its('descriptions') { should include ssl_certificate['description'] } its('certificates') { should include ssl_certificate['certificate'] } diff --git a/test/integration/verify/controls/google_compute_ssl_policies.rb b/test/integration/verify/controls/google_compute_ssl_policies.rb index c185a74cb..393393c78 100644 --- a/test/integration/verify/controls/google_compute_ssl_policies.rb +++ b/test/integration/verify/controls/google_compute_ssl_policies.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_ssl_policies resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -ssl_policy = attribute('ssl_policy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +ssl_policy = input('ssl_policy', value: { "name": "inspec-gcp-ssl-policy", "min_tls_version": "TLS_1_2", "profile": "CUSTOM", "custom_feature": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "custom_feature2": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" }) + control 'google_compute_ssl_policies-1.0' do impact 1.0 title 'google_compute_ssl_policies resource test' diff --git a/test/integration/verify/controls/google_compute_ssl_policy.rb b/test/integration/verify/controls/google_compute_ssl_policy.rb index af6a3b57e..9a9ba1a96 100644 --- a/test/integration/verify/controls/google_compute_ssl_policy.rb +++ b/test/integration/verify/controls/google_compute_ssl_policy.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_ssl_policy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -ssl_policy = attribute('ssl_policy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +ssl_policy = input('ssl_policy', value: { "name": "inspec-gcp-ssl-policy", "min_tls_version": "TLS_1_2", "profile": "CUSTOM", "custom_feature": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "custom_feature2": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" }) + control 'google_compute_ssl_policy-1.0' do impact 1.0 title 'google_compute_ssl_policy resource test' diff --git a/test/integration/verify/controls/google_compute_subnetwork.rb b/test/integration/verify/controls/google_compute_subnetwork.rb index a6a9601c5..ea5359ed6 100644 --- a/test/integration/verify/controls/google_compute_subnetwork.rb +++ b/test/integration/verify/controls/google_compute_subnetwork.rb @@ -1,28 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_subnetwork resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -subnetwork = attribute('subnetwork', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +subnetwork = input('subnetwork', value: { "name": "inspec-subnet", "ip_cidr_range": "10.2.0.0/16", "log_interval": "INTERVAL_10_MIN", "log_sampling": 0.5, "log_metadata": "INCLUDE_ALL_METADATA" }, description: 'Compute subnetwork description') + control 'google_compute_subnetwork-1.0' do impact 1.0 title 'google_compute_subnetwork resource test' diff --git a/test/integration/verify/controls/google_compute_subnetworks.rb b/test/integration/verify/controls/google_compute_subnetworks.rb index 4d5b530c4..c44130932 100644 --- a/test/integration/verify/controls/google_compute_subnetworks.rb +++ b/test/integration/verify/controls/google_compute_subnetworks.rb @@ -1,28 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_subnetworks resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -subnetwork = attribute('subnetwork', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +subnetwork = input('subnetwork', value: { "name": "inspec-subnet", "ip_cidr_range": "10.2.0.0/16", "log_interval": "INTERVAL_10_MIN", "log_sampling": 0.5, "log_metadata": "INCLUDE_ALL_METADATA" }, description: 'Compute subnetwork description') + control 'google_compute_subnetworks-1.0' do impact 1.0 title 'google_compute_subnetworks resource test' diff --git a/test/integration/verify/controls/google_compute_target_http_proxies.rb b/test/integration/verify/controls/google_compute_target_http_proxies.rb index 6973cc111..3c0984240 100644 --- a/test/integration/verify/controls/google_compute_target_http_proxies.rb +++ b/test/integration/verify/controls/google_compute_target_http_proxies.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_http_proxies resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -http_proxy = attribute('http_proxy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +http_proxy = input('http_proxy', value: { "name": "inspec-gcp-http-proxy", "description": "A HTTP proxy" }, description: 'Compute HTTP proxy definition') diff --git a/test/integration/verify/controls/google_compute_target_http_proxy.rb b/test/integration/verify/controls/google_compute_target_http_proxy.rb index c6b36adfd..768929388 100644 --- a/test/integration/verify/controls/google_compute_target_http_proxy.rb +++ b/test/integration/verify/controls/google_compute_target_http_proxy.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_http_proxy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -http_proxy = attribute('http_proxy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +http_proxy = input('http_proxy', value: { "name": "inspec-gcp-http-proxy", "description": "A HTTP proxy" }, description: 'Compute HTTP proxy definition') + control 'google_compute_target_http_proxy-1.0' do impact 1.0 title 'google_compute_target_http_proxy resource test' diff --git a/test/integration/verify/controls/google_compute_target_https_proxies.rb b/test/integration/verify/controls/google_compute_target_https_proxies.rb index 90d7a9eff..2cd0eec6b 100644 --- a/test/integration/verify/controls/google_compute_target_https_proxies.rb +++ b/test/integration/verify/controls/google_compute_target_https_proxies.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_https_proxies resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -https_proxy = attribute('https_proxy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +https_proxy = input('https_proxy', value: { "name": "inspec-gcp-https-proxy", "description": "A HTTPS target proxy" }, description: 'Compute HTTPS proxy definition') + control 'google_compute_target_https_proxies-1.0' do impact 1.0 title 'google_compute_target_https_proxies resource test' diff --git a/test/integration/verify/controls/google_compute_target_https_proxy.rb b/test/integration/verify/controls/google_compute_target_https_proxy.rb index 24ff7ea64..96731cb1b 100644 --- a/test/integration/verify/controls/google_compute_target_https_proxy.rb +++ b/test/integration/verify/controls/google_compute_target_https_proxy.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_https_proxy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -https_proxy = attribute('https_proxy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +https_proxy = input('https_proxy', value: { "name": "inspec-gcp-https-proxy", "description": "A HTTPS target proxy" }, description: 'Compute HTTPS proxy definition') + control 'google_compute_target_https_proxy-1.0' do impact 1.0 title 'google_compute_target_https_proxy resource test' diff --git a/test/integration/verify/controls/google_compute_target_pool.rb b/test/integration/verify/controls/google_compute_target_pool.rb index 03b49b8d7..7b6069bda 100644 --- a/test/integration/verify/controls/google_compute_target_pool.rb +++ b/test/integration/verify/controls/google_compute_target_pool.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_pool resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -gcp_ext_vm_name = attribute(:gcp_ext_vm_name, default: 'gcp_ext_vm_name', description: 'The name of a VM instance.') -target_pool = attribute('target_pool', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +gcp_ext_vm_name = input(:gcp_ext_vm_name, value: '', description: 'The name of a VM instance.') +target_pool = input('target_pool', value: { "name": "inspec-gcp-target-pool", "session_affinity": "CLIENT_IP" }, description: 'Target pool definition') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP zone.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone.') + control 'google_compute_target_pool-1.0' do impact 1.0 title 'google_compute_target_pool resource test' diff --git a/test/integration/verify/controls/google_compute_target_pools.rb b/test/integration/verify/controls/google_compute_target_pools.rb index 95e84d166..705c4ef7c 100644 --- a/test/integration/verify/controls/google_compute_target_pools.rb +++ b/test/integration/verify/controls/google_compute_target_pools.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_pools resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -gcp_ext_vm_name = attribute(:gcp_ext_vm_name, default: 'gcp_ext_vm_name', description: 'The name of a VM instance.') -target_pool = attribute('target_pool', default: { +# gcp_ext_vm_name = input(:gcp_ext_vm_name, value: '', description: 'The name of a VM instance.') +# gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +target_pool = input('target_pool', value: { "name": "inspec-gcp-target-pool", "session_affinity": "CLIENT_IP" }, description: 'Target pool definition') -gcp_zone = attribute(:gcp_zone, default: 'gcp_zone', description: 'The GCP zone.') + control 'google_compute_target_pools-1.0' do impact 1.0 title 'google_compute_target_pools resource test' diff --git a/test/integration/verify/controls/google_compute_target_tcp_proxies.rb b/test/integration/verify/controls/google_compute_target_tcp_proxies.rb index 12223ffcb..9a5dbf7aa 100644 --- a/test/integration/verify/controls/google_compute_target_tcp_proxies.rb +++ b/test/integration/verify/controls/google_compute_target_tcp_proxies.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_tcp_proxies resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -target_tcp_proxy = attribute('target_tcp_proxy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +target_tcp_proxy = input('target_tcp_proxy', value: { "name": "inspec-gcp-target-tcp-proxy", "proxy_header": "NONE", "tcp_backend_service_name": "gcp-inspec-tcp-backend-service" }, description: 'Compute TCP proxy definition') + control 'google_compute_target_tcp_proxies-1.0' do impact 1.0 title 'google_compute_target_tcp_proxies resource test' diff --git a/test/integration/verify/controls/google_compute_target_tcp_proxy.rb b/test/integration/verify/controls/google_compute_target_tcp_proxy.rb index e40b6ecea..9c960af5c 100644 --- a/test/integration/verify/controls/google_compute_target_tcp_proxy.rb +++ b/test/integration/verify/controls/google_compute_target_tcp_proxy.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_target_tcp_proxy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -target_tcp_proxy = attribute('target_tcp_proxy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +target_tcp_proxy = input('target_tcp_proxy', value: { "name": "inspec-gcp-target-tcp-proxy", "proxy_header": "NONE", "tcp_backend_service_name": "gcp-inspec-tcp-backend-service" }, description: 'Compute TCP proxy definition') + control 'google_compute_target_tcp_proxy-1.0' do impact 1.0 title 'google_compute_target_tcp_proxy resource test' diff --git a/test/integration/verify/controls/google_compute_url_map.rb b/test/integration/verify/controls/google_compute_url_map.rb index 264ea8798..3c8b803f0 100644 --- a/test/integration/verify/controls/google_compute_url_map.rb +++ b/test/integration/verify/controls/google_compute_url_map.rb @@ -1,21 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_url_map resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -url_map = attribute('url_map', default: { +# backend_service = input('backend_service', value: { +# "name": "inspec-gcp-backend-service", +# "description": "A description", +# "port_name": "http", +# "protocol": "HTTP", +# "timeout_sec": 10, +# "enable_cdn": true +# }, description: 'Backend service definition') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +url_map = input('url_map', value: { "name": "inspec-gcp-url-map", "description": "URL map description", "host_rule_host": "site.com", @@ -24,14 +18,7 @@ "test_host": "test.com", "test_path": "/home" }, description: 'Compute URL map definition') -backend_service = attribute('backend_service', default: { - "name": "inspec-gcp-backend-service", - "description": "A description", - "port_name": "http", - "protocol": "HTTP", - "timeout_sec": 10, - "enable_cdn": true -}, description: 'Backend service definition') + control 'google_compute_url_map-1.0' do impact 1.0 title 'google_compute_url_map resource test' diff --git a/test/integration/verify/controls/google_compute_url_maps.rb b/test/integration/verify/controls/google_compute_url_maps.rb index 2c85519c6..c383d64c7 100644 --- a/test/integration/verify/controls/google_compute_url_maps.rb +++ b/test/integration/verify/controls/google_compute_url_maps.rb @@ -1,21 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_url_maps resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -url_map = attribute('url_map', default: { +# backend_service = input('backend_service', value: { +# "name": "inspec-gcp-backend-service", +# "description": "A description", +# "port_name": "http", +# "protocol": "HTTP", +# "timeout_sec": 10, +# "enable_cdn": true +# }, description: 'Backend service definition') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +url_map = input('url_map', value: { "name": "inspec-gcp-url-map", "description": "URL map description", "host_rule_host": "site.com", @@ -24,14 +18,7 @@ "test_host": "test.com", "test_path": "/home" }, description: 'Compute URL map definition') -backend_service = attribute('backend_service', default: { - "name": "inspec-gcp-backend-service", - "description": "A description", - "port_name": "http", - "protocol": "HTTP", - "timeout_sec": 10, - "enable_cdn": true -}, description: 'Backend service definition') + control 'google_compute_url_maps-1.0' do impact 1.0 title 'google_compute_url_maps resource test' diff --git a/test/integration/verify/controls/google_compute_vms.rb b/test/integration/verify/controls/google_compute_vms.rb index 3bd7d9f9f..9556e636e 100644 --- a/test/integration/verify/controls/google_compute_vms.rb +++ b/test/integration/verify/controls/google_compute_vms.rb @@ -1,12 +1,11 @@ title 'Virtual Machines Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: '', description: 'The GCP zone being used.') -gcp_ext_vm_data_disk_name = attribute(:gcp_ext_vm_data_disk_name, default: '', description: 'A valid GCP VM name to check for.') -gcp_enable_gcloud_calls = attribute(:gcp_enable_gcloud_calls,default:0,description:'Flag to enable the use of gcloud command line to pull in live data to test against.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') +gcp_ext_vm_data_disk_name = input(:gcp_ext_vm_data_disk_name, value: '', description: 'A valid GCP VM name to check for.') +gcp_enable_gcloud_calls = input(:gcp_enable_gcloud_calls, value: 0, description: 'Flag to enable the use of gcloud command line to pull in live data to test against.') control 'gcp-vms-1.0' do - only_if { gcp_enable_gcloud_calls.to_i == 1 } impact 1.0 title 'Ensure VMs have the correct properties in bulk' @@ -20,5 +19,4 @@ gcp_instance_id = `gcloud compute instances list --filter="name=gcp-inspec-ext-linux-vm" --format=json | grep id | grep -o '[0-9]\\+'`.chomp its('instance_ids') { should include gcp_instance_id } end - end \ No newline at end of file diff --git a/test/integration/verify/controls/google_compute_vms_loop.rb b/test/integration/verify/controls/google_compute_vms_loop.rb index 15d1decbb..5577e7416 100644 --- a/test/integration/verify/controls/google_compute_vms_loop.rb +++ b/test/integration/verify/controls/google_compute_vms_loop.rb @@ -1,10 +1,9 @@ title 'Loop over all GCP Virtual Machines' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_zone = attribute(:gcp_zone, default: '', description: 'The GCP zone being used.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_zone = input(:gcp_zone, value: '', description: 'The GCP zone being used.') control 'gcp-vms-loop-1.0' do - impact 1.0 title 'Ensure VMs have the correct properties in bulk using google_compute_instance for detail.' diff --git a/test/integration/verify/controls/google_compute_vpn_tunnel.rb b/test/integration/verify/controls/google_compute_vpn_tunnel.rb index 3028836d3..671b9883b 100644 --- a/test/integration/verify/controls/google_compute_vpn_tunnel.rb +++ b/test/integration/verify/controls/google_compute_vpn_tunnel.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_vpn_tunnel resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -vpn_tunnel = attribute('vpn_tunnel', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +vpn_tunnel = input('vpn_tunnel', value: { "name": "inspec-vpn-tunnel", "peer_ip": "15.0.0.120", "shared_secret": "super secret" }, description: 'Compute VPN tunnel description') + control 'google_compute_vpn_tunnel-1.0' do impact 1.0 title 'google_compute_vpn_tunnel resource test' diff --git a/test/integration/verify/controls/google_compute_vpn_tunnels.rb b/test/integration/verify/controls/google_compute_vpn_tunnels.rb index 8c6e844b7..a1ec39222 100644 --- a/test/integration/verify/controls/google_compute_vpn_tunnels.rb +++ b/test/integration/verify/controls/google_compute_vpn_tunnels.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_vpn_tunnels resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -vpn_tunnel = attribute('vpn_tunnel', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +vpn_tunnel = input('vpn_tunnel', value: { "name": "inspec-vpn-tunnel", "peer_ip": "15.0.0.120", "shared_secret": "super secret" }, description: 'Compute VPN tunnel description') + control 'google_compute_vpn_tunnels-1.0' do impact 1.0 title 'google_compute_vpn_tunnels resource test' diff --git a/test/integration/verify/controls/google_compute_zone.rb b/test/integration/verify/controls/google_compute_zone.rb index a193ed865..7fe886e94 100644 --- a/test/integration/verify/controls/google_compute_zone.rb +++ b/test/integration/verify/controls/google_compute_zone.rb @@ -1,20 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_zone resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') + control 'google_compute_zone-1.0' do impact 1.0 title 'google_compute_zone resource test' diff --git a/test/integration/verify/controls/google_compute_zone_operation.rb b/test/integration/verify/controls/google_compute_zone_operation.rb index 21b490bc9..04b0ad746 100644 --- a/test/integration/verify/controls/google_compute_zone_operation.rb +++ b/test/integration/verify/controls/google_compute_zone_operation.rb @@ -1,39 +1,26 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_zone_operation resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -zone_operation = attribute('zone_operation', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +zone_operation = input('zone_operation', value: { "name": "operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69", "zone": "us-central1-a", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified zone') + control 'google_compute_zone_operation-1.0' do impact 1.0 title 'google_compute_zone_operation resource test' describe google_compute_zone_operation(project: gcp_project_id, zone: zone_operation['zone'], name: zone_operation['name']) do - it { should exist } - its('name') { should eq zone_operation['name'] } - its('status') { should eq zone_operation['status'] } - its('progress') { should eq zone_operation['progress'] } + it { should exist } + its('name') { should eq zone_operation['name'] } + its('status') { should eq zone_operation['status'] } + its('progress') { should eq zone_operation['progress'] } end describe google_compute_zone_operation(project: gcp_project_id, zone: zone_operation['zone'], name: 'nonexistent') do - it { should_not exist } + it { should_not exist } end end diff --git a/test/integration/verify/controls/google_compute_zone_operations.rb b/test/integration/verify/controls/google_compute_zone_operations.rb index 367461c6d..1ce3af589 100644 --- a/test/integration/verify/controls/google_compute_zone_operations.rb +++ b/test/integration/verify/controls/google_compute_zone_operations.rb @@ -1,27 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_zone_operations resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -zone_operation = attribute('zone_operation', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +zone_operation = input('zone_operation', value: { "name": "operation-1641188179305-5d4a6e66fe2bd-8fd1812d-d97f3b69", "zone": "us-central1-a", "operation_type": "compute.instanceGroupManagers.insert", "status": "DONE", "progress": 100 }, description: 'Operation resources contained within the specified zone') + control 'google_compute_zone_operations-1.0' do impact 1.0 title 'google_compute_zone_operations resource test' diff --git a/test/integration/verify/controls/google_compute_zones.rb b/test/integration/verify/controls/google_compute_zones.rb index fe0b8165a..72b9f5c36 100644 --- a/test/integration/verify/controls/google_compute_zones.rb +++ b/test/integration/verify/controls/google_compute_zones.rb @@ -1,20 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_compute_zones resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') + control 'google_compute_zones-1.0' do impact 1.0 title 'google_compute_zones resource test' diff --git a/test/integration/verify/controls/google_compute_zones_loop.rb b/test/integration/verify/controls/google_compute_zones_loop.rb index 8cd4c9a3f..bc66e9ace 100644 --- a/test/integration/verify/controls/google_compute_zones_loop.rb +++ b/test/integration/verify/controls/google_compute_zones_loop.rb @@ -1,9 +1,8 @@ title 'Loop over all GCP Zones' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-zones-loop-1.0' do - impact 1.0 title 'Ensure zones have the correct properties in bulk using google_compute_zone for detail.' diff --git a/test/integration/verify/controls/google_container_cluster.rb b/test/integration/verify/controls/google_container_cluster.rb index 4b223f6bd..f262d20f4 100644 --- a/test/integration/verify/controls/google_container_cluster.rb +++ b/test/integration/verify/controls/google_container_cluster.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_container_cluster resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: 'gcp_kube_cluster_name', description: 'GCP container cluster name') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: 'gcp_kube_cluster_zone', description: 'GCP container cluster zone') -gcp_kube_cluster_size = attribute(:gcp_kube_cluster_size, default: 'gcp_kube_cluster_size', description: 'GCP container cluster size') -gcp_kube_cluster_zone_extra1 = attribute(:gcp_kube_cluster_zone_extra1, default: 'gcp_kube_cluster_zone_extra1', description: 'First extra zone for the cluster') -gcp_kube_cluster_zone_extra2 = attribute(:gcp_kube_cluster_zone_extra2, default: 'gcp_kube_cluster_zone_extra2', description: 'Second extra zone for the cluster') -gcp_kube_cluster_master_user = attribute(:gcp_kube_cluster_master_user, default: 'gcp_kube_cluster_master_user', description: 'GCP container cluster admin username') +# gcp_kube_cluster_size = input(:gcp_kube_cluster_size, value: '', description: 'GCP container cluster size') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'GCP container cluster name') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'GCP container cluster zone') +gcp_kube_cluster_zone_extra1 = input(:gcp_kube_cluster_zone_extra1, value: '', description: 'First extra zone for the cluster') +gcp_kube_cluster_zone_extra2 = input(:gcp_kube_cluster_zone_extra2, value: '', description: 'Second extra zone for the cluster') +gcp_kube_cluster_master_user = input(:gcp_kube_cluster_master_user, value: '', description: 'GCP container cluster admin username') + control 'google_container_cluster-1.0' do impact 1.0 title 'google_container_cluster resource test' @@ -28,7 +15,6 @@ describe google_container_cluster(project: gcp_project_id, location: gcp_kube_cluster_zone, name: gcp_kube_cluster_name) do it { should exist } its('locations.sort'){ should cmp [ gcp_kube_cluster_zone, gcp_kube_cluster_zone_extra1, gcp_kube_cluster_zone_extra2 ].sort } - its('master_auth.username') { should eq gcp_kube_cluster_master_user } end diff --git a/test/integration/verify/controls/google_container_clusters.rb b/test/integration/verify/controls/google_container_clusters.rb index dcd58a423..c9c513293 100644 --- a/test/integration/verify/controls/google_container_clusters.rb +++ b/test/integration/verify/controls/google_container_clusters.rb @@ -1,26 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_container_clusters resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: 'gcp_kube_cluster_name', description: 'GCP container cluster name') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: 'gcp_kube_cluster_zone', description: 'GCP container cluster zone') -gcp_kube_cluster_size = attribute(:gcp_kube_cluster_size, default: 'gcp_kube_cluster_size', description: 'GCP container cluster size') -gcp_kube_cluster_zone_extra1 = attribute(:gcp_kube_cluster_zone_extra1, default: 'gcp_kube_cluster_zone_extra1', description: 'First extra zone for the cluster') -gcp_kube_cluster_zone_extra2 = attribute(:gcp_kube_cluster_zone_extra2, default: 'gcp_kube_cluster_zone_extra2', description: 'Second extra zone for the cluster') -gcp_kube_cluster_master_user = attribute(:gcp_kube_cluster_master_user, default: 'gcp_kube_cluster_master_user', description: 'GCP container cluster admin username') +# gcp_kube_cluster_size = input(:gcp_kube_cluster_size, value: '', description: 'GCP container cluster size') +# gcp_kube_cluster_zone_extra1 = input(:gcp_kube_cluster_zone_extra1, value: '', description: 'First extra zone for the cluster') +# gcp_kube_cluster_zone_extra2 = input(:gcp_kube_cluster_zone_extra2, value: '', description: 'Second extra zone for the cluster') +# gcp_kube_cluster_master_user = input(:gcp_kube_cluster_master_user, value: '', description: 'GCP container cluster admin username')gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'GCP container cluster name') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'GCP container cluster zone') + control 'google_container_clusters-1.0' do impact 1.0 title 'google_container_clusters resource test' diff --git a/test/integration/verify/controls/google_container_node_pool.rb b/test/integration/verify/controls/google_container_node_pool.rb index e9b04e5ab..ce08a6ae3 100644 --- a/test/integration/verify/controls/google_container_node_pool.rb +++ b/test/integration/verify/controls/google_container_node_pool.rb @@ -1,28 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_container_node_pool resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: 'gcp_kube_cluster_zone', description: 'The zone that the kube cluster resides in.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: 'gcp_kube_cluster_name', description: 'The parent container clusters name.') -regional_node_pool = attribute('regional_node_pool', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The zone that the kube cluster resides in.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The parent container clusters name.') +regional_node_pool = input('regional_node_pool', value: { "name": "inspec-gcp-regional-node-pool", "cluster_name": "inspec-gcp-regional-node-pool-cluster", "node_count": 1, "initial_node_count": 1 }, description: 'Regional Node Pool definition') + control 'google_container_node_pool-1.0' do impact 1.0 title 'google_container_node_pool resource test' diff --git a/test/integration/verify/controls/google_container_node_pools.rb b/test/integration/verify/controls/google_container_node_pools.rb index 46121ace0..27448421d 100644 --- a/test/integration/verify/controls/google_container_node_pools.rb +++ b/test/integration/verify/controls/google_container_node_pools.rb @@ -1,28 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_container_node_pools resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: 'gcp_kube_cluster_zone', description: 'The zone that the kube cluster resides in.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: 'gcp_kube_cluster_name', description: 'The parent container clusters name.') -regional_node_pool = attribute('regional_node_pool', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The zone that the kube cluster resides in.') +gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The parent container clusters name.') +regional_node_pool = input('regional_node_pool', value: { "name": "inspec-gcp-regional-node-pool", "cluster_name": "inspec-gcp-regional-node-pool-cluster", "node_count": 1, "initial_node_count": 1 }, description: 'Regional Node Pool definition') + control 'google_container_node_pools-1.0' do impact 1.0 title 'google_container_node_pools resource test' diff --git a/test/integration/verify/controls/google_container_server_config.rb b/test/integration/verify/controls/google_container_server_config.rb index 698afe3e1..fac2b3ed0 100644 --- a/test/integration/verify/controls/google_container_server_config.rb +++ b/test/integration/verify/controls/google_container_server_config.rb @@ -1,31 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_container_server_config resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_kube_cluster_zone = attribute(:gcp_kube_cluster_zone, default: 'gcp_kube_cluster_zone', description: 'The zone that the kube cluster resides in.') -gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: 'gcp_kube_cluster_name', description: 'The parent container clusters name.') -container_engine_versions = attribute('container_engine_versions', default: { +# gcp_kube_cluster_name = input(:gcp_kube_cluster_name, value: '', description: 'The parent container clusters name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kube_cluster_zone = input(:gcp_kube_cluster_zone, value: '', description: 'The zone that the kube cluster resides in.') +container_engine_versions = input('container_engine_versions', value: { "valid_master_version": "1.21.5-gke.1802", "valid_node_version": "1.21.5-gke.1802" }, description: 'Google Kubernetes Engine versions in a zone or region for a given project.') + control 'google_container_server_config-1.0' do impact 1.0 title 'google_container_server_config resource test' - describe google_container_server_config(project: gcp_project_id, location: gcp_kube_cluster_zone) do its('valid_master_versions') { should include container_engine_versions['valid_master_version']} its('valid_node_versions') { should include container_engine_versions['valid_node_version']} diff --git a/test/integration/verify/controls/google_dataproc_cluster.rb b/test/integration/verify/controls/google_dataproc_cluster.rb index 062f4e4be..5808e5fc7 100644 --- a/test/integration/verify/controls/google_dataproc_cluster.rb +++ b/test/integration/verify/controls/google_dataproc_cluster.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_dataproc_cluster resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -dataproc_cluster = attribute('dataproc_cluster', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +dataproc_cluster = input('dataproc_cluster', value: { "name": "inspec-dataproc-cluster", "label_key": "label", "label_value": "value", @@ -45,6 +31,7 @@ } } }, description: 'Dataproc cluster definition') + control 'google_dataproc_cluster-1.0' do impact 1.0 title 'google_dataproc_cluster resource test' diff --git a/test/integration/verify/controls/google_dataproc_clusters.rb b/test/integration/verify/controls/google_dataproc_clusters.rb index 837833637..99c7efc3a 100644 --- a/test/integration/verify/controls/google_dataproc_clusters.rb +++ b/test/integration/verify/controls/google_dataproc_clusters.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_dataproc_clusters resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -dataproc_cluster = attribute('dataproc_cluster', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +dataproc_cluster = input('dataproc_cluster', value: { "name": "inspec-dataproc-cluster", "label_key": "label", "label_value": "value", @@ -45,6 +31,7 @@ } } }, description: 'Dataproc cluster definition') + control 'google_dataproc_clusters-1.0' do impact 1.0 title 'google_dataproc_clusters resource test' diff --git a/test/integration/verify/controls/google_dns_managed_zone.rb b/test/integration/verify/controls/google_dns_managed_zone.rb index 515ac84b6..d2bbf2704 100644 --- a/test/integration/verify/controls/google_dns_managed_zone.rb +++ b/test/integration/verify/controls/google_dns_managed_zone.rb @@ -1,22 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_dns_managed_zone resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_dns_zone_name = attribute(:gcp_dns_zone_name, default: 'gcp_dns_zone_name', description: 'The DNS name of the DNS zone.') -dns_managed_zone = attribute('dns_managed_zone', default: {"name"=>"example-zone", "description"=>"example description", "dnssec_config_state"=>"on"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_dns_zone_name = input(:gcp_dns_zone_name, value: '', description: 'The DNS name of the DNS zone.') +dns_managed_zone = input('dns_managed_zone', value: { + "name"=>"example-zone", + "description"=>"example description", + "dnssec_config_state"=>"on" +}) + control 'google_dns_managed_zone-1.0' do impact 1.0 title 'google_dns_managed_zone resource test' diff --git a/test/integration/verify/controls/google_dns_managed_zones.rb b/test/integration/verify/controls/google_dns_managed_zones.rb index ae3783881..4e46338d1 100644 --- a/test/integration/verify/controls/google_dns_managed_zones.rb +++ b/test/integration/verify/controls/google_dns_managed_zones.rb @@ -1,22 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_dns_managed_zones resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_dns_zone_name = attribute(:gcp_dns_zone_name, default: 'gcp_dns_zone_name', description: 'The DNS name of the DNS zone.') -dns_managed_zone = attribute('dns_managed_zone', default: {"name"=>"example-zone", "description"=>"example description", "dnssec_config_state"=>"on"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_dns_zone_name = input(:gcp_dns_zone_name, value: '', description: 'The DNS name of the DNS zone.') +dns_managed_zone = input('dns_managed_zone', value: { + "name"=>"example-zone", + "description"=>"example description", + "dnssec_config_state"=>"on" +}) + control 'google_dns_managed_zones-1.0' do impact 1.0 title 'google_dns_managed_zones resource test' diff --git a/test/integration/verify/controls/google_dns_resource_record_set.rb b/test/integration/verify/controls/google_dns_resource_record_set.rb index 4cbeb88e1..08f34651d 100644 --- a/test/integration/verify/controls/google_dns_resource_record_set.rb +++ b/test/integration/verify/controls/google_dns_resource_record_set.rb @@ -1,34 +1,21 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_dns_resource_record_set resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -record_set = attribute('record_set', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +record_set = input('record_set', value: { "name": "backend.my.domain.com.", "type": "A", "ttl": 300, "rrdatas1": "8.8.8.8", "rrdatas2": "8.8.4.4" }) -managed_zone = attribute('managed_zone', default: { +managed_zone = input('managed_zone', value: { "name": "inspec-gcp-managed-zone", "dns_name": "my.domain.com.", "description": "A test DNS zone", "label_key": "key", "label_value": "value" }) + control 'google_dns_resource_record_set-1.0' do impact 1.0 title 'google_dns_resource_record_set resource test' diff --git a/test/integration/verify/controls/google_dns_resource_record_sets.rb b/test/integration/verify/controls/google_dns_resource_record_sets.rb index 9c9cad0d8..914aa49f2 100644 --- a/test/integration/verify/controls/google_dns_resource_record_sets.rb +++ b/test/integration/verify/controls/google_dns_resource_record_sets.rb @@ -1,34 +1,21 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_dns_resource_record_sets resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -record_set = attribute('record_set', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +record_set = input('record_set', value: { "name": "backend.my.domain.com.", "type": "A", "ttl": 300, "rrdatas1": "8.8.8.8", "rrdatas2": "8.8.4.4" }) -managed_zone = attribute('managed_zone', default: { +managed_zone = input('managed_zone', value: { "name": "inspec-gcp-managed-zone", "dns_name": "my.domain.com.", "description": "A test DNS zone", "label_key": "key", "label_value": "value" }) + control 'google_dns_resource_record_sets-1.0' do impact 1.0 title 'google_dns_resource_record_sets resource test' diff --git a/test/integration/verify/controls/google_filestore_instance.rb b/test/integration/verify/controls/google_filestore_instance.rb index 80a2014ea..473641955 100644 --- a/test/integration/verify/controls/google_filestore_instance.rb +++ b/test/integration/verify/controls/google_filestore_instance.rb @@ -1,21 +1,16 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_filestore_instance resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -filestore_instance = attribute('filestore_instance', default: {"name"=>"inspecgcp", "zone"=>"us-central1-b", "tier"=>"PREMIUM", "fileshare_capacity_gb"=>2660, "fileshare_name"=>"inspecgcp", "network_name"=>"default", "network_mode"=>"MODE_IPV4"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +filestore_instance = input('filestore_instance', value: { + "name"=>"inspecgcp", + "zone"=>"us-central1-b", + "tier"=>"PREMIUM", + "fileshare_capacity_gb"=>2660, + "fileshare_name"=>"inspecgcp", + "network_name"=>"default", + "network_mode"=>"MODE_IPV4" +}) + control 'google_filestore_instance-1.0' do impact 1.0 title 'google_filestore_instance resource test' diff --git a/test/integration/verify/controls/google_filestore_instances.rb b/test/integration/verify/controls/google_filestore_instances.rb index 18eec5aab..c47e3c72c 100644 --- a/test/integration/verify/controls/google_filestore_instances.rb +++ b/test/integration/verify/controls/google_filestore_instances.rb @@ -1,21 +1,16 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_filestore_instances resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -filestore_instance = attribute('filestore_instance', default: {"name"=>"inspecgcp", "zone"=>"us-central1-b", "tier"=>"PREMIUM", "fileshare_capacity_gb"=>2660, "fileshare_name"=>"inspecgcp", "network_name"=>"default", "network_mode"=>"MODE_IPV4"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +filestore_instance = input('filestore_instance', value: { + "name"=>"inspecgcp", + "zone"=>"us-central1-b", + "tier"=>"PREMIUM", + "fileshare_capacity_gb"=>2660, + "fileshare_name"=>"inspecgcp", + "network_name"=>"default", + "network_mode"=>"MODE_IPV4" +}) + control 'google_filestore_instances-1.0' do impact 1.0 title 'google_filestore_instances resource test' diff --git a/test/integration/verify/controls/google_iam_organization_custom_role.rb b/test/integration/verify/controls/google_iam_organization_custom_role.rb index 966b66599..1ca0b912e 100644 --- a/test/integration/verify/controls/google_iam_organization_custom_role.rb +++ b/test/integration/verify/controls/google_iam_organization_custom_role.rb @@ -1,22 +1,9 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_iam_organization_custom_role resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') -gcp_organization_iam_custom_role_id = attribute(:gcp_organization_iam_custom_role_id, default: 'gcp_organization_iam_custom_role_id', description: 'The IAM custom role identifier.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the folder') +gcp_organization_iam_custom_role_id = input(:gcp_organization_iam_custom_role_id, value: '', description: 'The IAM custom role identifier.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_iam_organization_custom_role-1.0' do impact 1.0 title 'google_iam_organization_custom_role resource test' diff --git a/test/integration/verify/controls/google_iam_organization_custom_roles.rb b/test/integration/verify/controls/google_iam_organization_custom_roles.rb index 26bd6a4e9..164db8898 100644 --- a/test/integration/verify/controls/google_iam_organization_custom_roles.rb +++ b/test/integration/verify/controls/google_iam_organization_custom_roles.rb @@ -1,22 +1,9 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_iam_organization_custom_roles resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') -gcp_organization_iam_custom_role_id = attribute(:gcp_organization_iam_custom_role_id, default: 'gcp_organization_iam_custom_role_id', description: 'The IAM custom role identifier.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the folder') +gcp_organization_iam_custom_role_id = input(:gcp_organization_iam_custom_role_id, value: '', description: 'The IAM custom role identifier.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_iam_organization_custom_roles-1.0' do impact 1.0 title 'google_iam_organization_custom_roles resource test' diff --git a/test/integration/verify/controls/google_kms_crypto_key.rb b/test/integration/verify/controls/google_kms_crypto_key.rb index f5090eb3f..6106e4eaa 100644 --- a/test/integration/verify/controls/google_kms_crypto_key.rb +++ b/test/integration/verify/controls/google_kms_crypto_key.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_kms_crypto_key resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name, default: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') -gcp_kms_crypto_key_name_policy = attribute(:gcp_kms_crypto_key_name_policy, default: 'gcp_kms_crypto_key_name_policy', description: 'Key name') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'GCP location') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'Key ring name') +gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'Key name') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_kms_crypto_key-1.0' do impact 1.0 title 'google_kms_crypto_key resource test' diff --git a/test/integration/verify/controls/google_kms_crypto_key_handwritten.rb b/test/integration/verify/controls/google_kms_crypto_key_handwritten.rb index 38c87bafd..5da443185 100644 --- a/test/integration/verify/controls/google_kms_crypto_key_handwritten.rb +++ b/test/integration/verify/controls/google_kms_crypto_key_handwritten.rb @@ -1,10 +1,10 @@ title 'Test single GCP KMS Crypto Key' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_kms_crypto_key_name_policy = attribute(:gcp_kms_crypto_key_name_policy, default: '', description: 'The GCP cryto key name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '',description: 'GCP key ring name to test against.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'The GCP cryto key name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-crypto-key-1.0' do diff --git a/test/integration/verify/controls/google_kms_crypto_key_iam_binding.rb b/test/integration/verify/controls/google_kms_crypto_key_iam_binding.rb index d27c4ee22..665c5284a 100644 --- a/test/integration/verify/controls/google_kms_crypto_key_iam_binding.rb +++ b/test/integration/verify/controls/google_kms_crypto_key_iam_binding.rb @@ -1,13 +1,12 @@ title 'GCP KMS Crypto Key IAM Binding Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') -gcp_kms_crypto_key_name_policy = attribute(:gcp_kms_crypto_key_name_policy, default: '', description: 'The GCP cryto key name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_kms_crypto_key_name_binding = attribute(:gcp_kms_crypto_key_name_binding,default:'',description:'GCP key ring name to test against.') -gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name, default: '', description: 'The GCP cryto key name.') - +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description:'GCP key ring name to test against.') +gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'The GCP cryto key name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_kms_crypto_key_name_binding = input(:gcp_kms_crypto_key_name_binding, value: '', description:'GCP key ring name to test against.') +gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'The GCP cryto key name.') control 'gcp-crypto-key-iam-binding-1.0' do diff --git a/test/integration/verify/controls/google_kms_crypto_key_iam_policy.rb b/test/integration/verify/controls/google_kms_crypto_key_iam_policy.rb index b6d01fe94..c9a002759 100644 --- a/test/integration/verify/controls/google_kms_crypto_key_iam_policy.rb +++ b/test/integration/verify/controls/google_kms_crypto_key_iam_policy.rb @@ -1,13 +1,12 @@ title 'GCP KMS Crypto Key IAM Bindings Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') -gcp_kms_crypto_key_name_binding = attribute(:gcp_kms_crypto_key_name_binding,default:'',description:'Key in key ring to test.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description:'GCP key ring name to test against.') +gcp_kms_crypto_key_name_binding = input(:gcp_kms_crypto_key_name_binding, value: '', description:'Key in key ring to test.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-crypto-key-iam-bindings-1.0' do - only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure GCP KMS Crypto Key IAM Bindings have the correct properties in bulk' diff --git a/test/integration/verify/controls/google_kms_crypto_keys.rb b/test/integration/verify/controls/google_kms_crypto_keys.rb index dfd928489..06b0ce213 100644 --- a/test/integration/verify/controls/google_kms_crypto_keys.rb +++ b/test/integration/verify/controls/google_kms_crypto_keys.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_kms_crypto_keys resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name, default: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') -gcp_kms_crypto_key_name_policy = attribute(:gcp_kms_crypto_key_name_policy, default: 'gcp_kms_crypto_key_name_policy', description: 'Key name') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'GCP location') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'Key ring name') +gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'Key name') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_kms_crypto_keys-1.0' do impact 1.0 title 'google_kms_crypto_keys resource test' diff --git a/test/integration/verify/controls/google_kms_crypto_keys_handwritten.rb b/test/integration/verify/controls/google_kms_crypto_keys_handwritten.rb index a6c51dabd..926034b24 100644 --- a/test/integration/verify/controls/google_kms_crypto_keys_handwritten.rb +++ b/test/integration/verify/controls/google_kms_crypto_keys_handwritten.rb @@ -1,13 +1,12 @@ title 'GCP KMS Crypto Keys Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') -gcp_kms_crypto_key_name_policy = attribute(:gcp_kms_crypto_key_name_policy, default: '', description: 'The GCP cryto key name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_kms_crypto_key_name_binding = attribute(:gcp_kms_crypto_key_name_binding,default:'',description:'GCP key ring name to test against.') -gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name, default: '', description: 'The GCP cryto key name.') - +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'GCP key ring name to test against.') +gcp_kms_crypto_key_name_policy = input(:gcp_kms_crypto_key_name_policy, value: '', description: 'The GCP cryto key name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_kms_crypto_key_name_binding = input(:gcp_kms_crypto_key_name_binding, value: '', description: 'GCP key ring name to test against.') +gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'The GCP cryto key name.') control 'gcp-crypto-keys-1.0' do diff --git a/test/integration/verify/controls/google_kms_key_ring.rb b/test/integration/verify/controls/google_kms_key_ring.rb index 91bd36666..f0aa07e22 100644 --- a/test/integration/verify/controls/google_kms_key_ring.rb +++ b/test/integration/verify/controls/google_kms_key_ring.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_kms_key_ring resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name, default: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'GCP location') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'Key ring name') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_kms_key_ring-1.0' do impact 1.0 title 'google_kms_key_ring resource test' diff --git a/test/integration/verify/controls/google_kms_key_ring_handwritten.rb b/test/integration/verify/controls/google_kms_key_ring_handwritten.rb index e8ac2831f..ef1b0d8d9 100644 --- a/test/integration/verify/controls/google_kms_key_ring_handwritten.rb +++ b/test/integration/verify/controls/google_kms_key_ring_handwritten.rb @@ -1,12 +1,11 @@ title 'Test single GCP KMS Key Ring' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:' Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'GCP key ring name to test against.') control 'gcp-key-ring-1.0' do - only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single KMS Key Ring has the correct properties.' diff --git a/test/integration/verify/controls/google_kms_key_ring_iam_binding.rb b/test/integration/verify/controls/google_kms_key_ring_iam_binding.rb index c2e9d3115..f0c459446 100644 --- a/test/integration/verify/controls/google_kms_key_ring_iam_binding.rb +++ b/test/integration/verify/controls/google_kms_key_ring_iam_binding.rb @@ -1,10 +1,10 @@ title 'Test single GCP KMS Key Ring IAM Binding' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') -gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'GCP key ring name to test against.') +gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'GCP key ring name to test against.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-key-ring-iam-binding-1.0' do diff --git a/test/integration/verify/controls/google_kms_key_ring_iam_policy.rb b/test/integration/verify/controls/google_kms_key_ring_iam_policy.rb index 0afc11256..3ca00f2c0 100644 --- a/test/integration/verify/controls/google_kms_key_ring_iam_policy.rb +++ b/test/integration/verify/controls/google_kms_key_ring_iam_policy.rb @@ -1,9 +1,9 @@ title 'GCP KMS Key Ring IAM Binding Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'GCP key ring name to test against.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-kms-key-ring-iam-bindings-1.0' do diff --git a/test/integration/verify/controls/google_kms_key_rings.rb b/test/integration/verify/controls/google_kms_key_rings.rb index d90a6577a..3edac6264 100644 --- a/test/integration/verify/controls/google_kms_key_rings.rb +++ b/test/integration/verify/controls/google_kms_key_rings.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_kms_key_rings resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name, default: 'gcp_kms_key_ring_policy_name', description: 'Key ring name') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'GCP location') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value: '', description: 'Key ring name') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_kms_key_rings-1.0' do impact 1.0 title 'google_kms_key_rings resource test' diff --git a/test/integration/verify/controls/google_kms_key_rings_handwritten.rb b/test/integration/verify/controls/google_kms_key_rings_handwritten.rb index 2556317bd..f0e2010ef 100644 --- a/test/integration/verify/controls/google_kms_key_rings_handwritten.rb +++ b/test/integration/verify/controls/google_kms_key_rings_handwritten.rb @@ -1,13 +1,12 @@ title 'GCP KMS Key Rings Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: '', description: 'The GCP region being used.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_kms_key_ring_policy_name = attribute(:gcp_kms_key_ring_policy_name,default:'',description:'GCP key ring name to test against.') -gcp_kms_key_ring_binding_member_name = attribute(:gcp_kms_key_ring_binding_member_name,default:'',description:'GCP key ring name to test against.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP region being used.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_kms_key_ring_policy_name = input(:gcp_kms_key_ring_policy_name, value:'', description: 'GCP key ring name to test against.') +gcp_kms_key_ring_binding_member_name = input(:gcp_kms_key_ring_binding_member_name, value: '', description: 'GCP key ring name to test against.') control 'gcp-key-rings-1.0' do - only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure KMS key rings have the correct properties in bulk' diff --git a/test/integration/verify/controls/google_lb_firewall_ip_ranges.rb b/test/integration/verify/controls/google_lb_firewall_ip_ranges.rb index 65c05f3df..8ada1a1ff 100644 --- a/test/integration/verify/controls/google_lb_firewall_ip_ranges.rb +++ b/test/integration/verify/controls/google_lb_firewall_ip_ranges.rb @@ -1,9 +1,8 @@ title 'Firewall Rule Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'google-lb-internal-firewall-rule-ip-ranges-1.0' do - impact 1.0 title 'Ensure that the Firewall Rule has been configured correctly with extra focus on expected IP ranges' diff --git a/test/integration/verify/controls/google_lb_firewall_source_target_tags.rb b/test/integration/verify/controls/google_lb_firewall_source_target_tags.rb index 74125eb11..9f0ecde23 100644 --- a/test/integration/verify/controls/google_lb_firewall_source_target_tags.rb +++ b/test/integration/verify/controls/google_lb_firewall_source_target_tags.rb @@ -1,9 +1,8 @@ title 'Firewall Rule Properties' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'google-lb-internal-firewall-rule-target-tags-1.0' do - impact 1.0 title 'Ensure that the Firewall Rule has been configured correctly and has expected source and target tags' diff --git a/test/integration/verify/controls/google_logging_folder_exclusion.rb b/test/integration/verify/controls/google_logging_folder_exclusion.rb index 4fbd38739..a6c36a7d4 100644 --- a/test/integration/verify/controls/google_logging_folder_exclusion.rb +++ b/test/integration/verify/controls/google_logging_folder_exclusion.rb @@ -1,22 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_folder_exclusion resource.' -folder_exclusion = attribute('folder_exclusion', default: {"name"=>"inspec-folder-exclusion", "description"=>"My folder exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +folder_exclusion = input('folder_exclusion', value: { + "name"=>"inspec-folder-exclusion", + "description"=>"My folder exclusion description", + "filter"=>"resource.type = gce_instance AND severity <= DEBUG" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_logging_folder_exclusion-1.0' do impact 1.0 title 'google_logging_folder_exclusion resource test' diff --git a/test/integration/verify/controls/google_logging_folder_exclusions.rb b/test/integration/verify/controls/google_logging_folder_exclusions.rb index da89529a9..afb99d3ee 100644 --- a/test/integration/verify/controls/google_logging_folder_exclusions.rb +++ b/test/integration/verify/controls/google_logging_folder_exclusions.rb @@ -1,22 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_folder_exclusions resource.' -folder_exclusion = attribute('folder_exclusion', default: {"name"=>"inspec-folder-exclusion", "description"=>"My folder exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +folder_exclusion = input('folder_exclusion', value: { + "name"=>"inspec-folder-exclusion", + "description"=>"My folder exclusion description", + "filter"=>"resource.type = gce_instance AND severity <= DEBUG" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_logging_folder_exclusions-1.0' do impact 1.0 title 'google_logging_folder_exclusions resource test' diff --git a/test/integration/verify/controls/google_logging_folder_log_sink.rb b/test/integration/verify/controls/google_logging_folder_log_sink.rb index c8803d423..8b105688b 100644 --- a/test/integration/verify/controls/google_logging_folder_log_sink.rb +++ b/test/integration/verify/controls/google_logging_folder_log_sink.rb @@ -1,22 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_folder_log_sink resource.' -folder_sink = attribute('folder_sink', default: {"name"=>"inspec-gcp-folder-sink", "filter"=>"resource.type = gce_instance AND severity >= ERROR"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +folder_sink = input('folder_sink', value: { + "name"=>"inspec-gcp-folder-sink", + "filter"=>"resource.type = gce_instance AND severity >= ERROR" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_logging_folder_log_sink-1.0' do impact 1.0 title 'google_logging_folder_log_sink resource test' diff --git a/test/integration/verify/controls/google_logging_folder_log_sinks.rb b/test/integration/verify/controls/google_logging_folder_log_sinks.rb index 48738f930..a25ddb1bc 100644 --- a/test/integration/verify/controls/google_logging_folder_log_sinks.rb +++ b/test/integration/verify/controls/google_logging_folder_log_sinks.rb @@ -1,22 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_folder_log_sinks resource.' -folder_sink = attribute('folder_sink', default: {"name"=>"inspec-gcp-folder-sink", "filter"=>"resource.type = gce_instance AND severity >= ERROR"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of the folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +folder_sink = input('folder_sink', value: { + "name"=>"inspec-gcp-folder-sink", + "filter"=>"resource.type = gce_instance AND severity >= ERROR"}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of the folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_logging_folder_log_sinks-1.0' do impact 1.0 title 'google_logging_folder_log_sinks resource test' diff --git a/test/integration/verify/controls/google_logging_organization_log_sink.rb b/test/integration/verify/controls/google_logging_organization_log_sink.rb index 04f756afb..67e84e7da 100644 --- a/test/integration/verify/controls/google_logging_organization_log_sink.rb +++ b/test/integration/verify/controls/google_logging_organization_log_sink.rb @@ -1,22 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_organization_log_sink resource.' -org_sink = attribute('org_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +org_sink = input('org_sink', value: { + "name"=>"inspec-gcp-org-sink", + "filter"=>"resource.type = gce_instance" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of this folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_logging_organization_log_sink-1.0' do impact 1.0 title 'google_logging_organization_log_sink resource test' diff --git a/test/integration/verify/controls/google_logging_organization_log_sinks.rb b/test/integration/verify/controls/google_logging_organization_log_sinks.rb index d0f4166ad..3aff05d9a 100644 --- a/test/integration/verify/controls/google_logging_organization_log_sinks.rb +++ b/test/integration/verify/controls/google_logging_organization_log_sinks.rb @@ -1,22 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_organization_log_sinks resource.' -org_sink = attribute('org_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +org_sink = input('org_sink', value: { + "name"=>"inspec-gcp-org-sink", + "filter"=>"resource.type = gce_instance" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of this folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_logging_organization_log_sinks-1.0' do impact 1.0 title 'google_logging_organization_log_sinks resource test' diff --git a/test/integration/verify/controls/google_logging_project_exclusion.rb b/test/integration/verify/controls/google_logging_project_exclusion.rb index a58e2d156..e71465aa1 100644 --- a/test/integration/verify/controls/google_logging_project_exclusion.rb +++ b/test/integration/verify/controls/google_logging_project_exclusion.rb @@ -1,27 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_project_exclusion resource.' -project_exclusion = attribute('project_exclusion', default: {"name"=>"inspec-project-exclusion", "description"=>"My project exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) -gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project identifier') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +project_exclusion = input('project_exclusion', value: { + "name"=>"inspec-project-exclusion", + "description"=>"My project exclusion description", + "filter"=>"resource.type = gce_instance AND severity <= DEBUG" +}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The project identifier') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_logging_project_exclusion-1.0' do impact 1.0 title 'google_logging_project_exclusion resource test' - only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_project_exclusion(project: gcp_project_id, name: project_exclusion['name']) do diff --git a/test/integration/verify/controls/google_logging_project_exclusions.rb b/test/integration/verify/controls/google_logging_project_exclusions.rb index 3849c3dcf..82a6252b6 100644 --- a/test/integration/verify/controls/google_logging_project_exclusions.rb +++ b/test/integration/verify/controls/google_logging_project_exclusions.rb @@ -1,27 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_project_exclusions resource.' -project_exclusion = attribute('project_exclusion', default: {"name"=>"inspec-project-exclusion", "description"=>"My project exclusion description", "filter"=>"resource.type = gce_instance AND severity <= DEBUG"}) -gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project identifier') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +project_exclusion = input('project_exclusion', value: { + "name"=>"inspec-project-exclusion", + "description"=>"My project exclusion description", + "filter"=>"resource.type = gce_instance AND severity <= DEBUG" +}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The project identifier') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_logging_project_exclusions-1.0' do impact 1.0 title 'google_logging_project_exclusions resource test' - only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } describe google_logging_project_exclusions(project: gcp_project_id) do diff --git a/test/integration/verify/controls/google_logging_project_sink.rb b/test/integration/verify/controls/google_logging_project_sink.rb index ea96d232c..2d7f565fb 100644 --- a/test/integration/verify/controls/google_logging_project_sink.rb +++ b/test/integration/verify/controls/google_logging_project_sink.rb @@ -1,23 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_project_sink resource.' -project_sink = attribute('project_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance AND severity = DEBUG"}) -gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project id.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +project_sink = input('project_sink', value: { + "name"=>"inspec-gcp-org-sink", + "filter"=>"resource.type = gce_instance AND severity = DEBUG"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The project id.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_logging_project_sink-1.0' do impact 1.0 title 'google_logging_project_sink resource test' diff --git a/test/integration/verify/controls/google_logging_project_sinks.rb b/test/integration/verify/controls/google_logging_project_sinks.rb index e7a6cf746..13d04ac54 100644 --- a/test/integration/verify/controls/google_logging_project_sinks.rb +++ b/test/integration/verify/controls/google_logging_project_sinks.rb @@ -1,23 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_logging_project_sinks resource.' -project_sink = attribute('project_sink', default: {"name"=>"inspec-gcp-org-sink", "filter"=>"resource.type = gce_instance AND severity = DEBUG"}) -gcp_project_id = attribute(:gcp_project_id, default: gcp_project_id, description: 'The project id.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +project_sink = input('project_sink', value: { + "name"=>"inspec-gcp-org-sink", + "filter"=>"resource.type = gce_instance AND severity = DEBUG" +}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The project id.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_logging_project_sinks-1.0' do impact 1.0 title 'google_logging_project_sinks resource test' diff --git a/test/integration/verify/controls/google_memcache_instance.rb b/test/integration/verify/controls/google_memcache_instance.rb index ea1116836..9d0283ac1 100644 --- a/test/integration/verify/controls/google_memcache_instance.rb +++ b/test/integration/verify/controls/google_memcache_instance.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_memcache_instance resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -memcache_instance = attribute('memcache_instance', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +memcache_instance = input('memcache_instance', value: { "name": "mem-instance" }, description: 'Memcache settings') + control 'google_memcache_instance-1.0' do impact 1.0 title 'google_memcache_instance resource test' diff --git a/test/integration/verify/controls/google_memcache_instances.rb b/test/integration/verify/controls/google_memcache_instances.rb index c388b49cf..ce033e7e7 100644 --- a/test/integration/verify/controls/google_memcache_instances.rb +++ b/test/integration/verify/controls/google_memcache_instances.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_memcache_instances resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -memcache_instance = attribute('memcache_instance', default: { - "name": "mem-instance" -}, description: 'Memcache settings') +# memcache_instance = input('memcache_instance', value: { +# "name": "mem-instance" +# }, description: 'Memcache settings') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') + control 'google_memcache_instances-1.0' do impact 1.0 title 'google_memcache_instances resource test' diff --git a/test/integration/verify/controls/google_ml_engine_model.rb b/test/integration/verify/controls/google_ml_engine_model.rb index 32bfea54f..ad89d3c1d 100644 --- a/test/integration/verify/controls/google_ml_engine_model.rb +++ b/test/integration/verify/controls/google_ml_engine_model.rb @@ -1,28 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_ml_engine_model resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -ml_model = attribute('ml_model', default: { +# gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +ml_model = input('ml_model', value: { "name": "ml_model", "region": "us-central1", "description": "My awesome ML model", "online_prediction_logging": true, "online_prediction_console_logging": true }, description: 'Machine learning model definition') + control 'google_ml_engine_model-1.0' do impact 1.0 title 'google_ml_engine_model resource test' diff --git a/test/integration/verify/controls/google_ml_engine_models.rb b/test/integration/verify/controls/google_ml_engine_models.rb index 7bddc2333..69acf8c0d 100644 --- a/test/integration/verify/controls/google_ml_engine_models.rb +++ b/test/integration/verify/controls/google_ml_engine_models.rb @@ -1,28 +1,15 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_ml_engine_models resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project region.') -ml_model = attribute('ml_model', default: { +# gcp_location = input(:gcp_location, value: '', description: 'The GCP project region.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +ml_model = input('ml_model', value: { "name": "ml_model", "region": "us-central1", "description": "My awesome ML model", "online_prediction_logging": true, "online_prediction_console_logging": true }, description: 'Machine learning model definition') + control 'google_ml_engine_models-1.0' do impact 1.0 title 'google_ml_engine_models resource test' diff --git a/test/integration/verify/controls/google_organization.rb b/test/integration/verify/controls/google_organization.rb index 5ac3c4b2f..4f086c5ed 100644 --- a/test/integration/verify/controls/google_organization.rb +++ b/test/integration/verify/controls/google_organization.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_organization resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of this folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_organization-1.0' do impact 1.0 title 'google_organization resource test' diff --git a/test/integration/verify/controls/google_organizations.rb b/test/integration/verify/controls/google_organizations.rb index 6c4cd2407..a9e67e055 100644 --- a/test/integration/verify/controls/google_organizations.rb +++ b/test/integration/verify/controls/google_organizations.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_organizations resource.' -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of this folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_organizations-1.0' do impact 1.0 title 'google_organizations resource test' diff --git a/test/integration/verify/controls/google_project.rb b/test/integration/verify/controls/google_project.rb index b15db0939..9ee8c92be 100644 --- a/test/integration/verify/controls/google_project.rb +++ b/test/integration/verify/controls/google_project.rb @@ -1,20 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') + control 'google_project-1.0' do impact 1.0 title 'google_project resource test' diff --git a/test/integration/verify/controls/google_project_alert_policies.rb b/test/integration/verify/controls/google_project_alert_policies.rb index b72d76ba5..994906af5 100644 --- a/test/integration/verify/controls/google_project_alert_policies.rb +++ b/test/integration/verify/controls/google_project_alert_policies.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_alert_policies resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -alert_policy = attribute('alert_policy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +alert_policy = input('alert_policy', value: { "display_name": "Display", "combiner": "OR", "condition_display_name": "condition", @@ -23,6 +9,7 @@ "condition_duration": "60s", "condition_comparison": "COMPARISON_GT" }, description: 'Alert Policy description') + control 'google_project_alert_policies-1.0' do impact 1.0 title 'google_project_alert_policies resource test' diff --git a/test/integration/verify/controls/google_project_alert_policy.rb b/test/integration/verify/controls/google_project_alert_policy.rb index 4645055d5..a7c199459 100644 --- a/test/integration/verify/controls/google_project_alert_policy.rb +++ b/test/integration/verify/controls/google_project_alert_policy.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_alert_policy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -alert_policy = attribute('alert_policy', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +alert_policy = input('alert_policy', value: { "display_name": "Display", "combiner": "OR", "condition_display_name": "condition", @@ -23,6 +9,7 @@ "condition_duration": "60s", "condition_comparison": "COMPARISON_GT" }, description: 'Alert Policy description') + control 'google_project_alert_policy-1.0' do impact 1.0 title 'google_project_alert_policy resource test' diff --git a/test/integration/verify/controls/google_project_iam_binding.rb b/test/integration/verify/controls/google_project_iam_binding.rb index 55ce91bdb..b854a633a 100644 --- a/test/integration/verify/controls/google_project_iam_binding.rb +++ b/test/integration/verify/controls/google_project_iam_binding.rb @@ -1,10 +1,9 @@ title 'Test single GCP project IAM Binding' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-project-iam-binding-1.0' do - only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure single GCP project IAM binding has the correct properties.' diff --git a/test/integration/verify/controls/google_project_iam_custom_role.rb b/test/integration/verify/controls/google_project_iam_custom_role.rb index edd829b8b..0ca95ace4 100644 --- a/test/integration/verify/controls/google_project_iam_custom_role.rb +++ b/test/integration/verify/controls/google_project_iam_custom_role.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_iam_custom_role resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_project_iam_custom_role_id = attribute(:gcp_project_iam_custom_role_id, default: 'gcp_project_iam_custom_role_id', description: 'The IAM custom role identifier.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_project_iam_custom_role_id = input(:gcp_project_iam_custom_role_id, value: '', description: 'The IAM custom role identifier.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_project_iam_custom_role-1.0' do impact 1.0 title 'google_project_iam_custom_role resource test' diff --git a/test/integration/verify/controls/google_project_iam_custom_roles.rb b/test/integration/verify/controls/google_project_iam_custom_roles.rb index 768bf40d1..c9f729bbf 100644 --- a/test/integration/verify/controls/google_project_iam_custom_roles.rb +++ b/test/integration/verify/controls/google_project_iam_custom_roles.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_iam_custom_roles resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_project_iam_custom_role_id = attribute(:gcp_project_iam_custom_role_id, default: 'gcp_project_iam_custom_role_id', description: 'The IAM custom role identifier.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_project_iam_custom_role_id = input(:gcp_project_iam_custom_role_id, value: '', description: 'The IAM custom role identifier.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = vainputlue(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_project_iam_custom_roles-1.0' do impact 1.0 title 'google_project_iam_custom_roles resource test' diff --git a/test/integration/verify/controls/google_project_logging_audit_config.rb b/test/integration/verify/controls/google_project_logging_audit_config.rb index c31d18423..ae78e7004 100644 --- a/test/integration/verify/controls/google_project_logging_audit_config.rb +++ b/test/integration/verify/controls/google_project_logging_audit_config.rb @@ -1,9 +1,8 @@ title 'Test GCP project logging audit configuration' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') control 'gcp-project-audit-logging-config-1.0' do - impact 1.0 title 'Ensure GCP project logging audit configuration has the correct properties.' diff --git a/test/integration/verify/controls/google_project_metric.rb b/test/integration/verify/controls/google_project_metric.rb index d4bdfebe5..895c7e18d 100644 --- a/test/integration/verify/controls/google_project_metric.rb +++ b/test/integration/verify/controls/google_project_metric.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_metric resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -logging_metric = attribute('logging_metric', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +logging_metric = input('logging_metric', value: { "name": "some/metric", "filter": "resource.type=gae_app AND severity>=ERROR", "metric_kind": "DELTA", "value_type": "INT64" }, description: 'Logging metric definition') + control 'google_project_metric-1.0' do impact 1.0 title 'google_project_metric resource test' diff --git a/test/integration/verify/controls/google_project_metrics.rb b/test/integration/verify/controls/google_project_metrics.rb index 7c32c2a95..0fe5f13e5 100644 --- a/test/integration/verify/controls/google_project_metrics.rb +++ b/test/integration/verify/controls/google_project_metrics.rb @@ -1,26 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_metrics resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -logging_metric = attribute('logging_metric', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +logging_metric = input('logging_metric', value: { "name": "some/metric", "filter": "resource.type=gae_app AND severity>=ERROR", "metric_kind": "DELTA", "value_type": "INT64" }, description: 'Logging metric definition') + control 'google_project_metrics-1.0' do impact 1.0 title 'google_project_metrics resource test' diff --git a/test/integration/verify/controls/google_project_service.rb b/test/integration/verify/controls/google_project_service.rb index 97fd50269..44ee7e031 100644 --- a/test/integration/verify/controls/google_project_service.rb +++ b/test/integration/verify/controls/google_project_service.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_service resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -service = attribute('service', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +service = input('service', value: { "name": "maps-android-backend.googleapis.com" }, description: 'Service description') + control 'google_project_service-1.0' do impact 1.0 title 'google_project_service resource test' diff --git a/test/integration/verify/controls/google_project_services.rb b/test/integration/verify/controls/google_project_services.rb index 2f152d234..fbe8e850e 100644 --- a/test/integration/verify/controls/google_project_services.rb +++ b/test/integration/verify/controls/google_project_services.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_project_services resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -service = attribute('service', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +service = input('service', value: { "name": "maps-android-backend.googleapis.com" }, description: 'Service description') + control 'google_project_services-1.0' do impact 1.0 title 'google_project_services resource test' diff --git a/test/integration/verify/controls/google_projects.rb b/test/integration/verify/controls/google_projects.rb index 6817e55b0..90eaa45bd 100644 --- a/test/integration/verify/controls/google_projects.rb +++ b/test/integration/verify/controls/google_projects.rb @@ -1,20 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_projects resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') + control 'google_projects-1.0' do impact 1.0 title 'google_projects resource test' diff --git a/test/integration/verify/controls/google_projects_firewalls_loop.rb b/test/integration/verify/controls/google_projects_firewalls_loop.rb index 8dda78ad5..32f8e9ce9 100644 --- a/test/integration/verify/controls/google_projects_firewalls_loop.rb +++ b/test/integration/verify/controls/google_projects_firewalls_loop.rb @@ -1,7 +1,6 @@ title 'Loop over all GCP Projects and look at firewalls in INGRESS direction' control 'gcp-projects-firewalls-loop-1.0' do - impact 1.0 title 'Ensure INGRESS firewalls in all projects have the correct properties using google_compute_firewall for detail.' @@ -10,9 +9,9 @@ describe google_compute_firewall(project: project_name, name: firewall_name) do it { should exist } its('direction') { should eq "INGRESS" } -# below uncommented is the same as the example in the README -# leaving out as some of the terraform resources have SSH open -# its('allowed_ssh?') { should be false } + # below uncommented is the same as the example in the README + # leaving out as some of the terraform resources have SSH open + # its('allowed_ssh?') { should be false } end end end diff --git a/test/integration/verify/controls/google_pubsub_subscription.rb b/test/integration/verify/controls/google_pubsub_subscription.rb index d1765643b..8f0eaf67a 100644 --- a/test/integration/verify/controls/google_pubsub_subscription.rb +++ b/test/integration/verify/controls/google_pubsub_subscription.rb @@ -1,21 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_pubsub_subscription resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -subscription = attribute('subscription', default: {"name"=>"inspec-gcp-subscription", "ack_deadline_seconds"=>20}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +subscription = input('subscription', value: { + "name"=>"inspec-gcp-subscription", + "ack_deadline_seconds"=>20 +}) control 'google_pubsub_subscription-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_pubsub_subscriptions.rb b/test/integration/verify/controls/google_pubsub_subscriptions.rb index 9ebe3eaa6..d3c3ab0cd 100644 --- a/test/integration/verify/controls/google_pubsub_subscriptions.rb +++ b/test/integration/verify/controls/google_pubsub_subscriptions.rb @@ -1,21 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_pubsub_subscriptions resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -subscription = attribute('subscription', default: {"name"=>"inspec-gcp-subscription", "ack_deadline_seconds"=>20}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +subscription = input('subscription', value: { + "name"=>"inspec-gcp-subscription", + "ack_deadline_seconds"=>20 +}) control 'google_pubsub_subscriptions-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_pubsub_topic.rb b/test/integration/verify/controls/google_pubsub_topic.rb index ee196b004..a9d19b3c1 100644 --- a/test/integration/verify/controls/google_pubsub_topic.rb +++ b/test/integration/verify/controls/google_pubsub_topic.rb @@ -1,21 +1,9 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_pubsub_topic resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -topic = attribute('topic', default: {"name"=>"inspec-gcp-topic"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +topic = input('topic', value: { + "name"=>"inspec-gcp-topic" +}) control 'google_pubsub_topic-1.0' do impact 1.0 @@ -25,7 +13,4 @@ it { should exist } end - describe google_pubsub_topic(project: gcp_project_id, name: 'nonexistent') do - it { should_not exist } - end end diff --git a/test/integration/verify/controls/google_pubsub_topics.rb b/test/integration/verify/controls/google_pubsub_topics.rb index 8ca38ac77..b82dbea11 100644 --- a/test/integration/verify/controls/google_pubsub_topics.rb +++ b/test/integration/verify/controls/google_pubsub_topics.rb @@ -1,21 +1,9 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_pubsub_topics resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -topic = attribute('topic', default: {"name"=>"inspec-gcp-topic"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +topic = input('topic', value: { + "name"=>"inspec-gcp-topic" +}) control 'google_pubsub_topics-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_redis_instance.rb b/test/integration/verify/controls/google_redis_instance.rb index de58bebfc..e8edae25f 100644 --- a/test/integration/verify/controls/google_redis_instance.rb +++ b/test/integration/verify/controls/google_redis_instance.rb @@ -1,21 +1,19 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_redis_instance resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -redis = attribute('redis', default: {"name"=>"my-redis-cache", "tier"=>"STANDARD_HA", "memory_size_gb"=>1, "region"=>"us-central1", "location_id"=>"us-central1-a", "alternative_location_id"=>"us-central1-f", "redis_version"=>"REDIS_3_2", "display_name"=>"InSpec test instance", "reserved_ip_range"=>"192.168.0.0/29", "label_key"=>"key", "label_value"=>"value"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +redis = input('redis', value: { + "name"=>"my-redis-cache", + "tier"=>"STANDARD_HA", + "memory_size_gb"=>1, + "region"=>"us-central1", + "location_id"=>"us-central1-a", + "alternative_location_id"=>"us-central1-f", + "redis_version"=>"REDIS_3_2", + "display_name"=>"InSpec test instance", + "reserved_ip_range"=>"192.168.0.0/29", + "label_key"=>"key", + "label_value"=>"value" +}) control 'google_redis_instance-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_redis_instances.rb b/test/integration/verify/controls/google_redis_instances.rb index ed8354ac9..11c6eb43a 100644 --- a/test/integration/verify/controls/google_redis_instances.rb +++ b/test/integration/verify/controls/google_redis_instances.rb @@ -1,21 +1,18 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_redis_instances resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -redis = attribute('redis', default: {"name"=>"my-redis-cache", "tier"=>"STANDARD_HA", "memory_size_gb"=>1, "region"=>"us-central1", "location_id"=>"us-central1-a", "alternative_location_id"=>"us-central1-f", "redis_version"=>"REDIS_3_2", "display_name"=>"InSpec test instance", "reserved_ip_range"=>"192.168.0.0/29", "label_key"=>"key", "label_value"=>"value"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +redis = input('redis', value: { + "name"=>"my-redis-cache", + "tier"=>"STANDARD_HA", + "memory_size_gb"=>1, + "region"=>"us-central1", + "location_id"=>"us-central1-a", + "alternative_location_id"=>"us-central1-f", + "redis_version"=>"REDIS_3_2", + "display_name"=>"InSpec test instance", + "reserved_ip_range"=>"192.168.0.0/29", "label_key"=>"key", + "label_value"=>"value"} +) control 'google_redis_instances-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_resourcemanager_folder.rb b/test/integration/verify/controls/google_resourcemanager_folder.rb index c40a55a12..c79cc250e 100644 --- a/test/integration/verify/controls/google_resourcemanager_folder.rb +++ b/test/integration/verify/controls/google_resourcemanager_folder.rb @@ -1,22 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_resourcemanager_folder resource.' -folder = attribute('folder', default: {"display_name"=>"inspec-gcp-folder"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +folder = input('folder', value: { + "display_name"=>"inspec-gcp-folder" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of this folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_resourcemanager_folder-1.0' do impact 1.0 title 'google_resourcemanager_folder resource test' diff --git a/test/integration/verify/controls/google_resourcemanager_folders.rb b/test/integration/verify/controls/google_resourcemanager_folders.rb index ecfdc9c18..a8fce0912 100644 --- a/test/integration/verify/controls/google_resourcemanager_folders.rb +++ b/test/integration/verify/controls/google_resourcemanager_folders.rb @@ -1,22 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_resourcemanager_folders resource.' -folder = attribute('folder', default: {"display_name"=>"inspec-gcp-folder"}) -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization that is the parent of this folder') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +folder = input('folder', value: { + "display_name"=>"inspec-gcp-folder" +}) +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization that is the parent of this folder') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') + control 'google_resourcemanager_folders-1.0' do impact 1.0 title 'google_resourcemanager_folders resource test' diff --git a/test/integration/verify/controls/google_runtime_config_config.rb b/test/integration/verify/controls/google_runtime_config_config.rb index 6c1ef8fce..a5b1fe6ec 100644 --- a/test/integration/verify/controls/google_runtime_config_config.rb +++ b/test/integration/verify/controls/google_runtime_config_config.rb @@ -1,21 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_runtime_config_config resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +runtimeconfig_config = input('runtimeconfig_config', value: { + "name"=>"inspec-gcp-runtime-config", + "description"=>"My runtime configurations"} +) control 'google_runtime_config_config-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_runtime_config_configs.rb b/test/integration/verify/controls/google_runtime_config_configs.rb index 658468a94..0614eeca8 100644 --- a/test/integration/verify/controls/google_runtime_config_configs.rb +++ b/test/integration/verify/controls/google_runtime_config_configs.rb @@ -1,21 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_runtime_config_configs resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +runtimeconfig_config = input('runtimeconfig_config', value: { + "name"=>"inspec-gcp-runtime-config", + "description"=>"My runtime configurations"} +) control 'google_runtime_config_configs-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_runtime_config_variable.rb b/test/integration/verify/controls/google_runtime_config_variable.rb index 53dc4b10e..48a554732 100644 --- a/test/integration/verify/controls/google_runtime_config_variable.rb +++ b/test/integration/verify/controls/google_runtime_config_variable.rb @@ -1,22 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_runtime_config_variable resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) -runtimeconfig_variable = attribute('runtimeconfig_variable', default: {"name"=>"prod-variables/hostname", "text"=>"example.com"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +runtimeconfig_config = input('runtimeconfig_config', value: { + "name"=>"inspec-gcp-runtime-config", + "description"=>"My runtime configurations"} +) +runtimeconfig_variable = input('runtimeconfig_variable', value: { + "name"=>"prod-variables/hostname", + "text"=>"example.com"} +) control 'google_runtime_config_variable-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_runtime_config_variables.rb b/test/integration/verify/controls/google_runtime_config_variables.rb index c81099bcb..2bcf24686 100644 --- a/test/integration/verify/controls/google_runtime_config_variables.rb +++ b/test/integration/verify/controls/google_runtime_config_variables.rb @@ -1,22 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_runtime_config_variables resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -runtimeconfig_config = attribute('runtimeconfig_config', default: {"name"=>"inspec-gcp-runtime-config", "description"=>"My runtime configurations"}) -runtimeconfig_variable = attribute('runtimeconfig_variable', default: {"name"=>"prod-variables/hostname", "text"=>"example.com"}) +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +runtimeconfig_config = input('runtimeconfig_config', value: { + "name"=>"inspec-gcp-runtime-config", + "description"=>"My runtime configurations"} +) +runtimeconfig_variable = input('runtimeconfig_variable', value: { + "name"=>"prod-variables/hostname", + "text"=>"example.com"} +) control 'google_runtime_config_variables-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_service_account.rb b/test/integration/verify/controls/google_service_account.rb index 614f8c77c..155e2ba6a 100644 --- a/test/integration/verify/controls/google_service_account.rb +++ b/test/integration/verify/controls/google_service_account.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_service_account resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The IAM service account display name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, default: '', description: 'The identifier of the organization') + control 'google_service_account-1.0' do impact 1.0 title 'google_service_account resource test' diff --git a/test/integration/verify/controls/google_service_account_key.rb b/test/integration/verify/controls/google_service_account_key.rb index 309428ed7..ddc3cb60f 100644 --- a/test/integration/verify/controls/google_service_account_key.rb +++ b/test/integration/verify/controls/google_service_account_key.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_service_account_key resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The IAM service account display name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_service_account_key-1.0' do impact 1.0 title 'google_service_account_key resource test' diff --git a/test/integration/verify/controls/google_service_account_keys.rb b/test/integration/verify/controls/google_service_account_keys.rb index 67ffed829..00b45d165 100644 --- a/test/integration/verify/controls/google_service_account_keys.rb +++ b/test/integration/verify/controls/google_service_account_keys.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_service_account_keys resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The IAM service account display name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_service_account_keys-1.0' do impact 1.0 title 'google_service_account_keys resource test' diff --git a/test/integration/verify/controls/google_service_accounts.rb b/test/integration/verify/controls/google_service_accounts.rb index 2507f3976..2b469fa9c 100644 --- a/test/integration/verify/controls/google_service_accounts.rb +++ b/test/integration/verify/controls/google_service_accounts.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_service_accounts resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The IAM service account display name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default:0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The IAM service account display name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_service_accounts-1.0' do impact 1.0 title 'google_service_accounts resource test' diff --git a/test/integration/verify/controls/google_sourcerepo_repositories.rb b/test/integration/verify/controls/google_sourcerepo_repositories.rb index de5e72980..f6aec7356 100644 --- a/test/integration/verify/controls/google_sourcerepo_repositories.rb +++ b/test/integration/verify/controls/google_sourcerepo_repositories.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sourcerepo_repositories resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -repository = attribute('repository', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +repository = input('repository', value: { "name": "inspec-gcp-repository" }, description: 'Source Repository definition') + control 'google_sourcerepo_repositories-1.0' do impact 1.0 title 'google_sourcerepo_repositories resource test' diff --git a/test/integration/verify/controls/google_sourcerepo_repository.rb b/test/integration/verify/controls/google_sourcerepo_repository.rb index dd325e0c8..633a7a789 100644 --- a/test/integration/verify/controls/google_sourcerepo_repository.rb +++ b/test/integration/verify/controls/google_sourcerepo_repository.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sourcerepo_repository resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -repository = attribute('repository', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +repository = input('repository', value: { "name": "inspec-gcp-repository" }, description: 'Source Repository definition') + control 'google_sourcerepo_repository-1.0' do impact 1.0 title 'google_sourcerepo_repository resource test' diff --git a/test/integration/verify/controls/google_spanner_database.rb b/test/integration/verify/controls/google_spanner_database.rb index d008bd47d..5b107ca99 100644 --- a/test/integration/verify/controls/google_spanner_database.rb +++ b/test/integration/verify/controls/google_spanner_database.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_spanner_database resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -spannerdatabase = attribute('spannerdatabase', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +spannerdatabase = input('spannerdatabase', value: { "name": "spdatabase", "instance": "spinstance", "ddl": "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" @@ -25,7 +11,6 @@ impact 1.0 title 'google_spanner_database resource test' - describe google_spanner_database(project: gcp_project_id, instance: spannerdatabase['instance'], name: spannerdatabase['name']) do it { should exist } its('name') { should match spannerdatabase['name'] } diff --git a/test/integration/verify/controls/google_spanner_databases.rb b/test/integration/verify/controls/google_spanner_databases.rb index b63780f64..285d80c1a 100644 --- a/test/integration/verify/controls/google_spanner_databases.rb +++ b/test/integration/verify/controls/google_spanner_databases.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_spanner_databases resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -spannerdatabase = attribute('spannerdatabase', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +spannerdatabase = input('spannerdatabase', value: { "name": "spdatabase", "instance": "spinstance", "ddl": "CREATE TABLE test (test STRING(MAX),) PRIMARY KEY (test)" @@ -25,7 +11,6 @@ impact 1.0 title 'google_spanner_databases resource test' - describe.one do google_spanner_databases(project: gcp_project_id, instance: spannerdatabase['instance']).names.each do |name| describe name do diff --git a/test/integration/verify/controls/google_spanner_instance.rb b/test/integration/verify/controls/google_spanner_instance.rb index b9d68a1ec..3c98be9bd 100644 --- a/test/integration/verify/controls/google_spanner_instance.rb +++ b/test/integration/verify/controls/google_spanner_instance.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_spanner_instance resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -spannerinstance = attribute('spannerinstance', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +spannerinstance = input('spannerinstance', value: { "config": "regional-us-east1", "name": "spinstance", "display_name": "inspectest", @@ -28,7 +14,6 @@ impact 1.0 title 'google_spanner_instance resource test' - describe google_spanner_instance(project: gcp_project_id, name: spannerinstance['name'], config: spannerinstance['config']) do it { should exist } its('config') { should match spannerinstance['config'] } diff --git a/test/integration/verify/controls/google_spanner_instance_iam_policy.rb b/test/integration/verify/controls/google_spanner_instance_iam_policy.rb index e171868c1..75e77ab6b 100644 --- a/test/integration/verify/controls/google_spanner_instance_iam_policy.rb +++ b/test/integration/verify/controls/google_spanner_instance_iam_policy.rb @@ -1,17 +1,16 @@ title 'Test GCP google_spanner_instance_iam_policy resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -spannerinstance = attribute('spannerinstance', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +spannerinstance = input('spannerinstance', value: { "config": "regional-us-east1", "name": "spinstance", "display_name": "inspectest", "num_nodes": 1, "label_key": "env", "label_value": "test" -}, description: 'Cloud Spanner definition') - -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default:'', description: 'Service account display name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +}, description: 'Cloud Spanner definition') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'Service account display name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description: 'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'google_spanner_instance_iam_policy-1.0' do diff --git a/test/integration/verify/controls/google_spanner_instances.rb b/test/integration/verify/controls/google_spanner_instances.rb index b1ba52c2a..6a85eb1cd 100644 --- a/test/integration/verify/controls/google_spanner_instances.rb +++ b/test/integration/verify/controls/google_spanner_instances.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_spanner_instances resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -spannerinstance = attribute('spannerinstance', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +spannerinstance = input('spannerinstance', value: { "config": "regional-us-east1", "name": "spinstance", "display_name": "inspectest", @@ -28,7 +14,6 @@ impact 1.0 title 'google_spanner_instances resource test' - describe.one do google_spanner_instances(project: gcp_project_id, config: spannerinstance['config']).configs.each do |config| describe config do diff --git a/test/integration/verify/controls/google_sql_connect.rb b/test/integration/verify/controls/google_sql_connect.rb index 3b7537dcb..05d0dbc2e 100644 --- a/test/integration/verify/controls/google_sql_connect.rb +++ b/test/integration/verify/controls/google_sql_connect.rb @@ -1,21 +1,7 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_connect resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -sql_connect = attribute('sql_connect', default: { +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +sql_connect = input('sql_connect', value: { "region": "us-central1", "database_version": "POSTGRES_13", "backend_type": "SECOND_GEN", @@ -28,7 +14,6 @@ impact 1.0 title 'google_sql_connect resource test' - describe google_sql_connect(project: gcp_project_id, instance: sql_connect['instance'], name: 'test') do it { should exist } its('region') { should include sql_connect['region'] } diff --git a/test/integration/verify/controls/google_sql_database.rb b/test/integration/verify/controls/google_sql_database.rb index a29d5b95c..a16d825e7 100644 --- a/test/integration/verify/controls/google_sql_database.rb +++ b/test/integration/verify/controls/google_sql_database.rb @@ -1,22 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_database resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') -gcp_db_name = attribute(:gcp_db_name, default: 'gcp_db_name', description: 'Database instance name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_db_instance_name = input(:gcp_db_instance_name, value: '', description: 'Database instance name.') +gcp_db_name = input(:gcp_db_name, value: '', description: 'Database instance name.') control 'google_sql_database-1.0' do impact 1.0 @@ -27,4 +13,4 @@ its('name') { should eq gcp_db_name } its('instance') { should eq gcp_db_instance_name } end -end +end \ No newline at end of file diff --git a/test/integration/verify/controls/google_sql_database_instance.rb b/test/integration/verify/controls/google_sql_database_instance.rb index 92a4f1fa4..ff556adc0 100644 --- a/test/integration/verify/controls/google_sql_database_instance.rb +++ b/test/integration/verify/controls/google_sql_database_instance.rb @@ -1,22 +1,9 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_database_instance resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') -gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') +# gcp_location = input(:gcp_location, value: '', description: 'The GCP project location.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_db_instance_name = input(:gcp_db_instance_name, value: '', description: 'Database instance name.') + control 'google_sql_database_instance-1.0' do impact 1.0 title 'google_sql_database_instance resource test' diff --git a/test/integration/verify/controls/google_sql_database_instances.rb b/test/integration/verify/controls/google_sql_database_instances.rb index c46fbd4f0..9ad5dc43a 100644 --- a/test/integration/verify/controls/google_sql_database_instances.rb +++ b/test/integration/verify/controls/google_sql_database_instances.rb @@ -1,27 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_database_instances resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') -gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project location.') +gcp_db_instance_name = input(:gcp_db_instance_name, value: '', description: 'Database instance name.') + control 'google_sql_database_instances-1.0' do impact 1.0 title 'google_sql_database_instances resource test' - - + describe google_sql_database_instances(project: gcp_project_id) do its('instance_states') { should include 'RUNNABLE' } its('instance_names') { should include gcp_db_instance_name } diff --git a/test/integration/verify/controls/google_sql_databases.rb b/test/integration/verify/controls/google_sql_databases.rb index 86e2caf12..574ae3041 100644 --- a/test/integration/verify/controls/google_sql_databases.rb +++ b/test/integration/verify/controls/google_sql_databases.rb @@ -1,27 +1,13 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_databases resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') -gcp_db_name = attribute(:gcp_db_name, default: 'gcp_db_name', description: 'Database instance name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_db_instance_name = input(:gcp_db_instance_name, value: '', description: 'Database instance name.') +gcp_db_name = input(:gcp_db_name, value: '', description: 'Database instance name.') + control 'google_sql_databases-1.0' do impact 1.0 title 'google_sql_databases resource test' - describe google_sql_databases(project: gcp_project_id, instance: gcp_db_instance_name) do it { should exist } its('names') { should include gcp_db_name } diff --git a/test/integration/verify/controls/google_sql_flags.rb b/test/integration/verify/controls/google_sql_flags.rb index 7edbdc051..e972f7f91 100644 --- a/test/integration/verify/controls/google_sql_flags.rb +++ b/test/integration/verify/controls/google_sql_flags.rb @@ -1,20 +1,6 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** Type: MMv1 *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_flags resource.' -sql_database_flag = attribute('sql_database_flag', default: { +sql_database_flag = input('sql_database_flag', value: { "name": "audit_log", "type": "STRING", "applies_to": "MYSQL_5_6", @@ -26,12 +12,11 @@ impact 1.0 title 'google_sql_flags resource test' - describe google_sql_flags do - its('names') { should include , sql_database_flag['name'] } - its('types') { should include , sql_database_flag['type'] } - its('applies_tos.first') { should include , sql_database_flag['applies_to'] } - its('allowed_string_values.first') { should include , sql_database_flag['allowed_string_values'] } - its('requires_restarts') { should include , sql_database_flag['requires_restart'] } + its('names') { should include , sql_database_flag['name'] } + its('types') { should include , sql_database_flag['type'] } + its('applies_tos.first') { should include , sql_database_flag['applies_to'] } + its('allowed_string_values.first') { should include , sql_database_flag['allowed_string_values'] } + its('requires_restarts') { should include , sql_database_flag['requires_restart'] } end end diff --git a/test/integration/verify/controls/google_sql_user.rb b/test/integration/verify/controls/google_sql_user.rb index 1653ddbae..feb88cc36 100644 --- a/test/integration/verify/controls/google_sql_user.rb +++ b/test/integration/verify/controls/google_sql_user.rb @@ -1,28 +1,14 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_user resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') -gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') -gcp_db_user_name = attribute(:gcp_db_user_name, default: 'gcp_db_user_name', description: 'SQL database user name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project location.') +gcp_db_instance_name = input(:gcp_db_instance_name, value: '', description: 'Database instance name.') +gcp_db_user_name = input(:gcp_db_user_name, value: '', description: 'SQL database user name.') + control 'google_sql_user-1.0' do impact 1.0 title 'google_sql_user resource test' - describe google_sql_user(project: gcp_project_id, database: gcp_db_instance_name, name: gcp_db_user_name, host: "example.com") do it { should exist } its('name') { should cmp gcp_db_user_name } diff --git a/test/integration/verify/controls/google_sql_users.rb b/test/integration/verify/controls/google_sql_users.rb index 8a3db4345..b6e12e454 100644 --- a/test/integration/verify/controls/google_sql_users.rb +++ b/test/integration/verify/controls/google_sql_users.rb @@ -1,23 +1,10 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_sql_users resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'The GCP project location.') -gcp_db_instance_name = attribute(:gcp_db_instance_name, default: 'gcp_db_instance_name', description: 'Database instance name.') -gcp_db_user_name = attribute(:gcp_db_user_name, default: 'gcp_db_user_name', description: 'SQL database user name.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'The GCP project location.') +gcp_db_instance_name = input(:gcp_db_instance_name, value: '', description: 'Database instance name.') +gcp_db_user_name = input(:gcp_db_user_name, value: '', description: 'SQL database user name.') + control 'google_sql_users-1.0' do impact 1.0 title 'google_sql_users resource test' diff --git a/test/integration/verify/controls/google_storage_bucket.rb b/test/integration/verify/controls/google_storage_bucket.rb index 79e24af07..bedd1896f 100644 --- a/test/integration/verify/controls/google_storage_bucket.rb +++ b/test/integration/verify/controls/google_storage_bucket.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_storage_bucket resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_location = input(:gcp_location, value: '', description: 'GCP location') + control 'google_storage_bucket-1.0' do impact 1.0 title 'google_storage_bucket resource test' diff --git a/test/integration/verify/controls/google_storage_bucket_acl.rb b/test/integration/verify/controls/google_storage_bucket_acl.rb index f4be8b5e9..e524dc174 100644 --- a/test/integration/verify/controls/google_storage_bucket_acl.rb +++ b/test/integration/verify/controls/google_storage_bucket_acl.rb @@ -1,24 +1,11 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_storage_bucket_acl resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_acl = attribute(:gcp_storage_bucket_acl, default: 'gcp_storage_bucket_acl', description: 'The name of the storage bucket with ACLs attached') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_storage_bucket_acl = input(:gcp_storage_bucket_acl, value: '', description: 'The name of the storage bucket with ACLs attached') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The name of the service account assigned permissions') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_storage_bucket_acl-1.0' do impact 1.0 title 'google_storage_bucket_acl resource test' diff --git a/test/integration/verify/controls/google_storage_bucket_iam_binding.rb b/test/integration/verify/controls/google_storage_bucket_iam_binding.rb index b48a1b6c0..5f2074362 100644 --- a/test/integration/verify/controls/google_storage_bucket_iam_binding.rb +++ b/test/integration/verify/controls/google_storage_bucket_iam_binding.rb @@ -1,14 +1,13 @@ title 'Test single GCP storage bucket IAM binding' -gcp_project_id = attribute(:gcp_project_id, default: '', description: 'The GCP project identifier.') -gcp_storage_bucket_binding = attribute(:gcp_storage_bucket_binding, default: '', description: 'The GCP bucket with IAM binding.') -gcp_storage_bucket_member = attribute(:gcp_storage_bucket_member, default: '', description: 'The GCP bucket with IAM member.') -gcp_storage_bucket_policy = attribute(:gcp_storage_bucket_policy, default: '', description: 'The GCP bucket with IAM policy.') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default:'', description: 'Service account display name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_storage_bucket_binding = input(:gcp_storage_bucket_binding, value: '', description: 'The GCP bucket with IAM binding.') +gcp_storage_bucket_member = input(:gcp_storage_bucket_member, value: '', description: 'The GCP bucket with IAM member.') +gcp_storage_bucket_policy = input(:gcp_storage_bucket_policy, value: '', description: 'The GCP bucket with IAM policy.') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value:'', description: 'Service account display name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-storage-bucket-iam-binding-1.0' do - only_if { gcp_enable_privileged_resources.to_i == 1 } impact 1.0 title 'Ensure storage bucket IAM binding has the correct properties.' diff --git a/test/integration/verify/controls/google_storage_bucket_object.rb b/test/integration/verify/controls/google_storage_bucket_object.rb index 646b26a6c..bd282c0d5 100644 --- a/test/integration/verify/controls/google_storage_bucket_object.rb +++ b/test/integration/verify/controls/google_storage_bucket_object.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_storage_bucket_object resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: 'gcp_storage_bucket_object', description: 'The name of the storage bucket with an object') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: 'gcp_storage_bucket_object_name', description: 'The name of the object') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +# gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +# gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The name of the service account assigned permissions') +gcp_storage_bucket_object = input(:gcp_storage_bucket_object, value: '', description: 'The name of the storage bucket with an object') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_storage_bucket_object_name = input(:gcp_storage_bucket_object_name, value: '', description: 'The name of the object') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_storage_bucket_object-1.0' do impact 1.0 title 'google_storage_bucket_object resource test' diff --git a/test/integration/verify/controls/google_storage_bucket_object_handwritten.rb b/test/integration/verify/controls/google_storage_bucket_object_handwritten.rb index adaf9b09a..1eef70860 100644 --- a/test/integration/verify/controls/google_storage_bucket_object_handwritten.rb +++ b/test/integration/verify/controls/google_storage_bucket_object_handwritten.rb @@ -1,8 +1,8 @@ title 'Storage Bucket Object Properties' -gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: '', description: 'The GCP bucket with objects.') -gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: '', description: 'The GCP bucket object name.') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') +gcp_storage_bucket_object = input(:gcp_storage_bucket_object, value: '', description: 'The GCP bucket with objects.') +gcp_storage_bucket_object_name = input(:gcp_storage_bucket_object_name, value: '', description: 'The GCP bucket object name.') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: 0, description:'Flag to enable privileged resources requiring elevated privileges in GCP.') control 'gcp-storage-bucket-object-1.0' do diff --git a/test/integration/verify/controls/google_storage_bucket_objects.rb b/test/integration/verify/controls/google_storage_bucket_objects.rb index e49891eb6..4bd83dece 100644 --- a/test/integration/verify/controls/google_storage_bucket_objects.rb +++ b/test/integration/verify/controls/google_storage_bucket_objects.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_storage_bucket_objects resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: 'gcp_storage_bucket_object', description: 'The name of the storage bucket with an object') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: 'gcp_storage_bucket_object_name', description: 'The name of the object') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +# gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +# gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The name of the service account assigned permissions') +gcp_storage_bucket_object = input(:gcp_storage_bucket_object, value: '', description: 'The name of the storage bucket with an object') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_storage_bucket_object_name = input(:gcp_storage_bucket_object_name, value: '', description: 'The name of the object') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_storage_bucket_objects-1.0' do impact 1.0 title 'google_storage_bucket_objects resource test' diff --git a/test/integration/verify/controls/google_storage_buckets.rb b/test/integration/verify/controls/google_storage_buckets.rb index 4b1e23e24..57be73625 100644 --- a/test/integration/verify/controls/google_storage_buckets.rb +++ b/test/integration/verify/controls/google_storage_buckets.rb @@ -1,21 +1,8 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_storage_buckets resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_location = attribute(:gcp_location, default: 'gcp_location', description: 'GCP location') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +# gcp_location = input(:gcp_location, value: '', description: 'GCP location') + control 'google_storage_buckets-1.0' do impact 1.0 title 'google_storage_buckets resource test' diff --git a/test/integration/verify/controls/google_storage_default_object_acl.rb b/test/integration/verify/controls/google_storage_default_object_acl.rb index d6b582947..ed7957b74 100644 --- a/test/integration/verify/controls/google_storage_default_object_acl.rb +++ b/test/integration/verify/controls/google_storage_default_object_acl.rb @@ -1,30 +1,17 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- +title 'Test GCP google_storage_value_object_acl resource.' -title 'Test GCP google_storage_default_object_acl resource.' +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_storage_bucket_name = input(:gcp_storage_bucket_name, value: '', description: 'The name of the storage bucket with the value object ACL') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The name of the service account assigned permissions') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_name = attribute(:gcp_storage_bucket_name, default: 'gcp_storage_bucket_name', description: 'The name of the storage bucket with the default object ACL') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') -control 'google_storage_default_object_acl-1.0' do +control 'google_storage_value_object_acl-1.0' do impact 1.0 - title 'google_storage_default_object_acl resource test' + title 'google_storage_value_object_acl resource test' only_if { gcp_enable_privileged_resources.to_i == 1 && gcp_organization_id != '' } - describe google_storage_default_object_acl(bucket: gcp_storage_bucket_name, entity: "user-#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do + describe google_storage_value_object_acl(bucket: gcp_storage_bucket_name, entity: "user-#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com") do it { should exist } its('role') { should cmp "OWNER" } @@ -32,7 +19,7 @@ its('email') { should include "#{gcp_service_account_display_name}@#{gcp_project_id}.iam.gserviceaccount.com" } end - describe google_storage_default_object_acl(bucket: gcp_storage_bucket_name, entity: "allUsers") do + describe google_storage_value_object_acl(bucket: gcp_storage_bucket_name, entity: "allUsers") do it { should_not exist } end end diff --git a/test/integration/verify/controls/google_storage_object_acl.rb b/test/integration/verify/controls/google_storage_object_acl.rb index bdd85ea2f..ad0ec7b52 100644 --- a/test/integration/verify/controls/google_storage_object_acl.rb +++ b/test/integration/verify/controls/google_storage_object_acl.rb @@ -1,25 +1,12 @@ -# ---------------------------------------------------------------------------- -# -# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** -# -# ---------------------------------------------------------------------------- -# -# This file is automatically generated by Magic Modules and manual -# changes will be clobbered when the file is regenerated. -# -# Please read more about how to change this file in README.md and -# CONTRIBUTING.md located at the root of this package. -# -# ---------------------------------------------------------------------------- - title 'Test GCP google_storage_object_acl resource.' -gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') -gcp_storage_bucket_object = attribute(:gcp_storage_bucket_object, default: 'gcp_storage_bucket_object', description: 'The name of the storage bucket with ACLs attached') -gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default: 'gcp_service_account_display_name', description: 'The name of the service account assigned permissions') -gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources, default: 'gcp_enable_privileged_resources', description: 'If we are running tests with escalated permissions(required for this test)') -gcp_storage_bucket_object_name = attribute(:gcp_storage_bucket_object_name, default: 'gcp_storage_bucket_object_name', description: 'The name of the object with ACLs') -gcp_organization_id = attribute(:gcp_organization_id, default: gcp_organization_id, description: 'The identifier of the organization') +gcp_project_id = input(:gcp_project_id, value: '', description: 'The GCP project identifier.') +gcp_storage_bucket_object = input(:gcp_storage_bucket_object, value: '', description: 'The name of the storage bucket with ACLs attached') +gcp_service_account_display_name = input(:gcp_service_account_display_name, value: '', description: 'The name of the service account assigned permissions') +gcp_enable_privileged_resources = input(:gcp_enable_privileged_resources, value: '', description: 'If we are running tests with escalated permissions(required for this test)') +gcp_storage_bucket_object_name = input(:gcp_storage_bucket_object_name, value: '', description: 'The name of the object with ACLs') +gcp_organization_id = input(:gcp_organization_id, value: '', description: 'The identifier of the organization') + control 'google_storage_object_acl-1.0' do impact 1.0 title 'google_storage_object_acl resource test'