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

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

  interconnect_attachment = input('interconnect_attachment', value: {
  "name": "on-prem-attachment",
  "project": "ppradhan",
  "region": "us-central1",
  "kind": "compute#interconnectAttachment",
  "self_link": "https://www.googleapis.com/compute/v1/projects/ppradhan/regions/us-central1/interconnectAttachments/on-prem-attachment",
  "encryption": "NONE",
  "stack_type": "IPV4_ONLY",
}, description: 'interconnect_attachment description')
control 'google_compute_interconnect_attachment-1.0' do
  impact 1.0
  title 'google_compute_interconnect_attachment resource test'

  describe google_compute_interconnect_attachment(name: interconnect_attachment['name'], project: gcp_project_id, region: interconnect_attachment['region']) do
  	it { should exist }
  	its('kind') { should cmp interconnect_attachment['kind'] }
  	its('description') { should cmp interconnect_attachment['description'] }
  	its('self_link') { should cmp interconnect_attachment['self_link'] }
  	its('name') { should cmp interconnect_attachment['name'] }
    its('encryption') { should cmp interconnect_attachment['encryption'] }
    its('stack_type') { should cmp interconnect_attachment['stack_type'] }
  end

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