Skip to content

Commit

Permalink
rename resource name
Browse files Browse the repository at this point in the history
Signed-off-by: balasubramanian-s <balasubramanian.s@progress.com>
  • Loading branch information
balasubramanian-s committed Aug 29, 2024
1 parent b266b0f commit 81563db
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 129 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
+++

title = "google_apigee_organization_endpoint_attachment Resource"
title = "google_apigee_endpoint_attachment Resource"
platform = "gcp"
draft = false
gh_repo = "inspec-gcp"


[menu.inspec]

title = "google_apigee_organization_endpoint_attachment"
identifier = "inspec/resources/gcp/google_apigee_organization_endpoint_attachment Resource"
title = "google_apigee_endpoint_attachment"
identifier = "inspec/resources/gcp/google_apigee_endpoint_attachment Resource"
parent = "inspec/resources/gcp"
+++

Use the `google_apigee_organization_endpoint_attachment` InSpec audit resource to test the properties of a test a Google OrganizationEndpointAttachment.
Use the `google_apigee_endpoint_attachment` InSpec audit resource to test the properties of a test a Google EndpointAttachment.

## Installation
{{% inspec_gcp_install %}}

## Syntax
A `google_apigee_organization_endpoint_attachment` is used to test a Google OrganizationEndpointAttachment resource
A `google_apigee_endpoint_attachment` is used to test a Google EndpointAttachment resource

## Examples
```
describe google_apigee_organization_endpoint_attachment(name: ' value_name') do
describe google_apigee_endpoint_attachment(name: ' value_name') do
it { should exist }
its('host') { should cmp 'value_host' }
its('connection_state') { should cmp 'value_connectionstate' }
Expand All @@ -34,16 +34,16 @@ describe google_apigee_organization_endpoint_attachment(name: ' value_name') do
end
describe google_apigee_organization_endpoint_attachment(name: "does_not_exit") do
describe google_apigee_endpoint_attachment(name: "does_not_exit") do
it { should_not exist }
end
```

## Parameters
Properties that can be accessed from the `google_apigee_organization_endpoint_attachment` resource:
Properties that can be accessed from the `google_apigee_endpoint_attachment` resource:

## Properties
Properties that can be accessed from the `google_apigee_organization_endpoint_attachment` resource:
Properties that can be accessed from the `google_apigee_endpoint_attachment` resource:


* `host`: Output only. Host that can be used in either the HTTP target endpoint directly or as the host in target server.
Expand Down
58 changes: 58 additions & 0 deletions docs/resources/google_apigee_endpoint_attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
+++

title = "google_apigee_endpoint_attachments Resource"
platform = "gcp"
draft = false
gh_repo = "inspec-gcp"


[menu.inspec]

title = "google_apigee_endpoint_attachments"
identifier = "inspec/resources/gcp/google_apigee_endpoint_attachments Resource"
parent = "inspec/resources/gcp"
+++

Use the `google_apigee_endpoint_attachments` InSpec audit resource to test the properties of a test a Google EndpointAttachment.

## Installation
{{% inspec_gcp_install %}}

## Syntax
A `google_apigee_endpoint_attachments` is used to test a Google EndpointAttachment resource

## Examples
```
describe google_apigee_endpoint_attachments() do
it { should exist }
end
```

## Parameters
Properties that can be accessed from the `google_apigee_endpoint_attachments` resource:

See [google_apigee_endpoint_attachment.md](google_apigee_endpoint_attachment.md) for more detailed information
* `hosts`: an array of `google_apigee_endpoint_attachment` host
* `connection_states`: an array of `google_apigee_endpoint_attachment` connection_state
* `service_attachments`: an array of `google_apigee_endpoint_attachment` service_attachment
* `locations`: an array of `google_apigee_endpoint_attachment` location
* `names`: an array of `google_apigee_endpoint_attachment` name
* `states`: an array of `google_apigee_endpoint_attachment` state
## Properties
Properties that can be accessed from the `google_apigee_endpoint_attachments` resource:

See [google_apigee_endpoint_attachment.md](google_apigee_endpoint_attachment.md) for more detailed information
* `hosts`: an array of `google_apigee_endpoint_attachment` host
* `connection_states`: an array of `google_apigee_endpoint_attachment` connection_state
* `service_attachments`: an array of `google_apigee_endpoint_attachment` service_attachment
* `locations`: an array of `google_apigee_endpoint_attachment` location
* `names`: an array of `google_apigee_endpoint_attachment` name
* `states`: an array of `google_apigee_endpoint_attachment` state

## Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with `where` as a block or a method.

## GCP Permissions

Ensure the [Apigee API](https://console.cloud.google.com/apis/library/apigee.googleapis.com/) is enabled for the current project.
58 changes: 0 additions & 58 deletions docs/resources/google_apigee_organization_endpoint_attachments.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
require 'gcp_backend'

# A provider to manage Apigee resources.
class ApigeeOrganizationEndpointAttachment < GcpResourceBase
name 'google_apigee_organization_endpoint_attachment'
desc 'OrganizationEndpointAttachment'
class ApigeeEndpointAttachment < GcpResourceBase
name 'google_apigee_endpoint_attachment'
desc 'EndpointAttachment'
supports platform: 'gcp'

attr_reader :params
Expand Down Expand Up @@ -50,7 +50,7 @@ def exists?
end

def to_s
"OrganizationEndpointAttachment #{@params[:name]}"
"EndpointAttachment #{@params[:name]}"
end

private
Expand All @@ -60,6 +60,6 @@ def product_url(_ = nil)
end

def resource_base_url
'{{+name}}'
'{{name}}'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#
# ----------------------------------------------------------------------------
require 'gcp_backend'
class ApigeeOrganizationEndpointAttachments < GcpResourceBase
name 'google_apigee_organization_endpoint_attachments'
desc 'OrganizationEndpointAttachment plural resource'
class ApigeeEndpointAttachments < GcpResourceBase
name 'google_apigee_endpoint_attachments'
desc 'EndpointAttachment plural resource'
supports platform: 'gcp'

attr_reader :table
Expand All @@ -35,7 +35,7 @@ class ApigeeOrganizationEndpointAttachments < GcpResourceBase
def initialize(params = {})
super(params.merge({ use_http_transport: true }))
@params = params
@table = fetch_wrapped_resource('organizationEndpointAttachments')
@table = fetch_wrapped_resource('endpointAttachments')
end

def fetch_wrapped_resource(wrap_path)
Expand Down Expand Up @@ -84,6 +84,6 @@ def product_url(_ = nil)
end

def resource_base_url
'{{+parent}}/endpointAttachments'
'{{parent}}/endpointAttachments'
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ----------------------------------------------------------------------------
#
# *** 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_apigee_endpoint_attachment resource.'

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"
}, description: 'endpoint_attachment description')
control 'google_apigee_endpoint_attachment-1.0' do
impact 1.0
title 'google_apigee_endpoint_attachment resource test'

describe google_apigee_endpoint_attachment(name: endpoint_attachment['name']) do
it { should exist }
its('host') { should cmp endpoint_attachment['host'] }
its('connection_state') { should cmp endpoint_attachment['connection_state'] }
its('service_attachment') { should cmp endpoint_attachment['service_attachment'] }
its('location') { should cmp endpoint_attachment['location'] }
its('name') { should cmp endpoint_attachment['name'] }
its('state') { should cmp endpoint_attachment['state'] }

end

describe google_apigee_endpoint_attachment(name: "does_not_exit") do
it { should_not exist }
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
#
# ----------------------------------------------------------------------------

title 'Test GCP google_apigee_organization_endpoint_attachments resource.'
title 'Test GCP google_apigee_endpoint_attachments resource.'

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

organization_endpoint_attachment = input('organization_endpoint_attachment', value: {
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"
}, description: 'organization_endpoint_attachment description')
control 'google_apigee_organization_endpoint_attachments-1.0' do
}, description: 'endpoint_attachment description')
control 'google_apigee_endpoint_attachments-1.0' do
impact 1.0
title 'google_apigee_organization_endpoint_attachments resource test'
title 'google_apigee_endpoint_attachments resource test'

describe google_apigee_organization_endpoint_attachments() do
describe google_apigee_endpoint_attachments() do
it { should exist }
end
end

This file was deleted.

0 comments on commit 81563db

Please sign in to comment.