diff --git a/README.md b/README.md index 67095f07..0ff52772 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,8 @@ The following resources are available in the InSpec GCP Profile | [google_access_context_manager_access_level](docs/resources/google_access_context_manager_access_level.md) | [google_access_context_manager_access_levels](docs/resources/google_access_context_manager_access_levels.md) | | [google_access_context_manager_access_policy](docs/resources/google_access_context_manager_access_policy.md) | [google_access_context_manager_access_policies](docs/resources/google_access_context_manager_access_policies.md) | | [google_access_context_manager_service_perimeter](docs/resources/google_access_context_manager_service_perimeter.md) | [google_access_context_manager_service_perimeters](docs/resources/google_access_context_manager_service_perimeters.md) | -| [google_apigeegoogle_apigee_organization_envgroup](docs/resources/google_apigee_organization_envgroup.md) | [google_apigee_organization_envgroups](docs/resources/google_apigee_organization_envgroups.md) | +| [google_apigee_endpoint_attachment](docs/resources/google_apigee_endpoint_attachment.md) | [google_apigee_endpoint_attachments](docs/resources/google_apigee_endpoint_attachments.md) | +| [google_apigee_organization_envgroup](docs/resources/google_apigee_organization_envgroup.md) | [google_apigee_organization_envgroups](docs/resources/google_apigee_organization_envgroups.md) | | [google_apigee_organization_envgroup_attachment](docs/resources/google_apigee_organization_envgroup_attachment.md) | [google_apigee_organization_envgroup_attachments](docs/resources/google_apigee_organization_envgroup_attachments.md) | | [google_appengine_standard_app_version](docs/resources/google_appengine_standard_app_version.md) | [google_appengine_standard_app_versions](docs/resources/google_appengine_standard_app_versions.md) | | [google_bigquery_dataset](docs/resources/google_bigquery_dataset.md) | [google_bigquery_datasets](docs/resources/google_bigquery_datasets.md) | diff --git a/docs/resources/google_apigee_endpoint_attachments.md b/docs/resources/google_apigee_endpoint_attachments.md index a157f393..8fb4f937 100644 --- a/docs/resources/google_apigee_endpoint_attachments.md +++ b/docs/resources/google_apigee_endpoint_attachments.md @@ -23,8 +23,14 @@ A `google_apigee_endpoint_attachments` is used to test a Google EndpointAttachme ## Examples ``` - describe google_apigee_endpoint_attachments() do + describe google_apigee_endpoint_attachments() do it { should exist } + its('hosts') { should include 'value_host' } + its('connection_states') { should include 'value_connectionstate' } + its('service_attachments') { should include 'value_serviceattachment' } + its('locations') { should include 'value_location' } + its('names') { should include 'value_name' } + its('states') { should include 'value_state' } end ``` diff --git a/test/integration/verify/controls/google_apigee_endpoint_attachment.rb b/test/integration/verify/controls/google_apigee_endpoint_attachment.rb index 245d27ae..a968f7e1 100644 --- a/test/integration/verify/controls/google_apigee_endpoint_attachment.rb +++ b/test/integration/verify/controls/google_apigee_endpoint_attachment.rb @@ -17,13 +17,13 @@ gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') endpoint_attachment = input('endpoint_attachment', value: { - "name": "value_name", - "parent": "value_parent", - "host": "value_host", - "connection_state": "value_connectionstate", - "service_attachment": "value_serviceattachment", - "location": "value_location", - "state": "value_state" + "name": "organizations/ppradhan/endpointAttachments/inspec-test-attachment", + "parent": "organizations/ppradhan", + "host": "7.0.0.2", + "connection_state": "ACCEPTED", + "service_attachment": "projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb", + "location": "us-central1", + "state": "ACTIVE" }, description: 'endpoint_attachment description') control 'google_apigee_endpoint_attachment-1.0' do impact 1.0 diff --git a/test/integration/verify/controls/google_apigee_endpoint_attachments.rb b/test/integration/verify/controls/google_apigee_endpoint_attachments.rb index b15e2fcd..8e1a2b3e 100644 --- a/test/integration/verify/controls/google_apigee_endpoint_attachments.rb +++ b/test/integration/verify/controls/google_apigee_endpoint_attachments.rb @@ -17,13 +17,13 @@ gcp_project_id = input(:gcp_project_id, value: 'gcp_project_id', description: 'The GCP project identifier.') endpoint_attachment = input('endpoint_attachment', value: { - "name": "value_name", - "parent": "value_parent", - "host": "value_host", - "connection_state": "value_connectionstate", - "service_attachment": "value_serviceattachment", - "location": "value_location", - "state": "value_state" + "name": "organizations/ppradhan/endpointAttachments/inspec-test-attachment", + "parent": "organizations/ppradhan", + "host": "7.0.0.2", + "connection_state": "ACCEPTED", + "service_attachment": "projects/ppradhan/regions/us-central1/serviceAttachments/my-psc-ilb", + "location": "us-central1", + "state": "ACTIVE" }, description: 'endpoint_attachment description') control 'google_apigee_endpoint_attachments-1.0' do impact 1.0 @@ -31,5 +31,11 @@ describe google_apigee_endpoint_attachments() do it { should exist } + its('hosts') { should include endpoint_attachment['host'] } + its('connection_states') { should include endpoint_attachment['connection_state'] } + its('service_attachments') { should include endpoint_attachment['service_attachment'] } + its('locations') { should include endpoint_attachment['location'] } + its('names') { should include endpoint_attachment['name'] } + its('states') { should include endpoint_attachment['state'] } end end