From 665dbf492489c0f73048ca4de02e99c0bf1ab7c5 Mon Sep 17 00:00:00 2001 From: Samir Anand Date: Thu, 30 Nov 2023 00:30:14 +0530 Subject: [PATCH] Automatically generated by magic modules for service: apigee and resource: Organizations__envgroups__attachment. This commit includes the following changes: - Singular Resource ERB File - Plural Resource ERB File - Terraform configuration - api.yaml configuration for product apigee and resource Organizations__envgroups__attachment Signed-off-by: Samir Anand --- mmv1/products/apigee/api.yaml | 98 +++++++++++++++++++ mmv1/products/apigee/inspec.yaml | 15 +++ ...pigee_organization_envgroup_attachment.erb | 14 +++ ...ization_envgroup_attachment_attributes.erb | 3 + ...igee_organization_envgroup_attachments.erb | 5 + .../configuration/mm-attributes.yml | 8 +- 6 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 mmv1/products/apigee/inspec.yaml create mode 100644 mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb create mode 100644 mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb create mode 100644 mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb diff --git a/mmv1/products/apigee/api.yaml b/mmv1/products/apigee/api.yaml index 1c0bfcec7..37f413527 100644 --- a/mmv1/products/apigee/api.yaml +++ b/mmv1/products/apigee/api.yaml @@ -498,3 +498,101 @@ objects: 'Creating an environment': 'https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment' api: 'https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.endpointAttachments/create' + + + + - !ruby/object:Api::Resource + name: OrganizationEnvgroupAttachment + base_url: '{{parent}}/attachments' + self_link: '{{name}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/apigee/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + EnvironmentGroupAttachment is a resource which defines an attachment of an environment to an environment group. + properties: + + - !ruby/object:Api::Type::String + name: 'createdAt' + description: | + Output only. The time at which the environment group attachment was created as milliseconds since epoch. + - !ruby/object:Api::Type::String + name: 'environment' + description: | + Required. ID of the attached environment. + - !ruby/object:Api::Type::String + name: 'environmentGroupId' + description: | + Output only. ID of the environment group. + - !ruby/object:Api::Type::String + name: 'name' + description: | + ID of the environment group attachment. + + + + + - !ruby/object:Api::Resource + name: OrganizationEnvgroupAttachment + base_url: '{{parent}}/attachments' + self_link: '{{name}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/apigee/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + EnvironmentGroupAttachment is a resource which defines an attachment of an environment to an environment group. + properties: + + - !ruby/object:Api::Type::String + name: 'createdAt' + description: | + Output only. The time at which the environment group attachment was created as milliseconds since epoch. + - !ruby/object:Api::Type::String + name: 'environment' + description: | + Required. ID of the attached environment. + - !ruby/object:Api::Type::String + name: 'environmentGroupId' + description: | + Output only. ID of the environment group. + - !ruby/object:Api::Type::String + name: 'name' + description: | + ID of the environment group attachment. + diff --git a/mmv1/products/apigee/inspec.yaml b/mmv1/products/apigee/inspec.yaml new file mode 100644 index 000000000..28cb365e9 --- /dev/null +++ b/mmv1/products/apigee/inspec.yaml @@ -0,0 +1,15 @@ +# Copyright 2017 Google Inc. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- !ruby/object:Provider::Inspec::Config +overrides: !ruby/object:Overrides::ResourceOverrides diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb new file mode 100644 index 000000000..cc52129ba --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb @@ -0,0 +1,14 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> +<% organization_envgroup_attachment = grab_attributes(pwd)['organization_envgroup_attachment'] -%> +describe google_apigee_organization_envgroup_attachment(name: <%= doc_generation ? "' #{organization_envgroup_attachment['name']}'":"organization_envgroup_attachment['name']" -%>) do + it { should exist } + its('created_at') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['created_at']}'" : "organization_envgroup_attachment['created_at']" -%> } + its('environment') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['environment']}'" : "organization_envgroup_attachment['environment']" -%> } + its('environment_group_id') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['environment_group_id']}'" : "organization_envgroup_attachment['environment_group_id']" -%> } + its('name') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['name']}'" : "organization_envgroup_attachment['name']" -%> } + +end + +describe google_apigee_organization_envgroup_attachment(name: "does_not_exit") do + it { should_not exist } +end \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb new file mode 100644 index 000000000..e93cd6671 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb @@ -0,0 +1,3 @@ +gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.') + + organization_envgroup_attachment = input('organization_envgroup_attachment', value: <%= JSON.pretty_generate(grab_attributes(pwd)['organization_envgroup_attachment']) -%>, description: 'organization_envgroup_attachment description') \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb new file mode 100644 index 000000000..a14609955 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb @@ -0,0 +1,5 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> + <% organization_envgroup_attachment = grab_attributes(pwd)['organization_envgroup_attachment'] -%> + describe google_apigee_organization_envgroup_attachments(parent: <%= doc_generation ? "' #{organization_envgroup_attachment['parent']}'":"organization_envgroup_attachment['parent']" -%>) do + it { should exist } + end \ No newline at end of file diff --git a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml index ee0783a9e..40ebdac51 100644 --- a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml +++ b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml @@ -895,4 +895,10 @@ vpn_gateway: network : "value_network" self_link : "value_selflink" label_fingerprint : "value_labelfingerprint" - stack_type : "value_stacktype" \ No newline at end of file + stack_type : "value_stacktype" +organization_envgroup_attachment: + name : "value_name" + parent : "value_parent" + created_at : "value_createdat" + environment : "value_environment" + environment_group_id : "value_environmentgroupid" \ No newline at end of file