Skip to content

google_compute_instance_group doesn't respond to exists? or exist?  #22

Closed
@darkn3rd

Description

Summary

When using it { should exist } as per embedded documentation for google_compute_instance_group, getting error. Also, if this is indeed not supported, it would not be consistent with other resources.

Reproduce

describe google_compute_instance_group(project: PROJECT_NAME, zone: CLUSTER_ZONE, name: 'gke-guestbook-default-pool-d84d40bd-grp') do
    it { should exist }
end

Actual Result

     ×  Instance Group gke-guestbook-default-pool-d84d40bd-grp should exist
     expected Instance Group gke-guestbook-default-pool-d84d40bd-grp to exist but it does not respond to either `exist?` or `exists?`

Expected

Expected this to work as per embedded documentation:

Embedded Docs:

  class GoogleComputeInstanceGroup < GcpResourceBase
    name 'google_compute_instance_group'
    desc 'Verifies settings for a compute instance group'

    example "
      describe google_compute_instance_group(project: 'chef-inspec-gcp', location: 'us-west2', name: 'gcp-inspec-test') do
        it { should exist }
        its('name') { should eq 'inspec-test' }
        its('status') { should eq 'in_use' }
        ...
      end
    "

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions