# ----------------------------------------------------------------------------
#
#     ***     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_ssl_policy resource.'

gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.')

region_ssl_policy = input('region_ssl_policy', value: {
  "project": "ppradhan",
  "region": "us-central1",
  "full_region": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1",
  "kind": "compute#sslPolicy",
  "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/sslPolicies/basic-ssl-policy",
  "name": "basic-ssl-policy",
  "profile": "MODERN",
  "min_tls_version": "TLS_1_0",
}, description: 'region_ssl_policy description')

control 'google_compute_region_ssl_policy-1.0' do
  impact 1.0
  title 'google_compute_region_ssl_policy resource test'

  describe google_compute_region_ssl_policy(project: gcp_project_id, region: region_ssl_policy['region'], name: region_ssl_policy['name']) do
  	it { should exist }
  	its('kind') { should cmp region_ssl_policy['kind'] }
  	its('self_link') { should cmp region_ssl_policy['self_link'] }
  	its('name') { should cmp region_ssl_policy['name'] }
  	its('profile') { should cmp region_ssl_policy['profile'] }
  	its('min_tls_version') { should cmp region_ssl_policy['min_tls_version'] }
  	its('region') { should cmp region_ssl_policy['full_region'] }
  end

  describe google_compute_region_ssl_policy(project: gcp_project_id, region: region_ssl_policy['region'], name: "donotexist") do
  	it { should_not exist }
  end
end
