Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHEF-ORG-MAGIC-MODULE-orgpolicy-Folders__policy - Resource Implementation #157

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
568 changes: 568 additions & 0 deletions mmv1/products/orgpolicy/api.yaml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions mmv1/products/orgpolicy/inspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% folder_policy = grab_attributes(pwd)['folder_policy'] -%>
describe google_orgpolicy_folder_policies(parent: <%= doc_generation ? "' #{folder_policy['parent']}'":"folder_policy['parent']" -%>) do
it { should exist }
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% folder_policy = grab_attributes(pwd)['folder_policy'] -%>
describe google_orgpolicy_folder_policy(name: <%= doc_generation ? "' #{folder_policy['name']}'":"folder_policy['name']" -%>) do
it { should exist }
its('name') { should cmp <%= doc_generation ? "'#{folder_policy['name']}'" : "folder_policy['name']" -%> }

end

describe google_orgpolicy_folder_policy(name: "does_not_exit") do
it { should_not exist }
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.')

folder_policy = input('folder_policy', value: <%= JSON.pretty_generate(grab_attributes(pwd)['folder_policy']) -%>, description: 'folder_policy description')
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,11 @@ project_location_environment:
create_time : "value_createtime"
update_time : "value_updatetime"


folder_policy:
name : "value_name"
parent : "value_parent"

organization_api_revision:
name : "value_name"
content_type : "value_contenttype"
Expand Down
Loading