Implement proper support for data access logs in resource manager modules (#1497)
* organization module * rename iam_bindings_authoritative to iam_policy, fix tests * add support for data access logs and iam policy to folder module * test inventories * add support for data access logs and iam policy to project module
This commit is contained in:
committed by
GitHub
parent
438a3134e2
commit
551dc581e8
34
tests/modules/project/examples/iam-policy.yaml
Normal file
34
tests/modules/project/examples/iam-policy.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
values:
|
||||
module.project.google_project.project[0]:
|
||||
auto_create_network: false
|
||||
billing_account: 123456-123456-123456
|
||||
folder_id: '1234567890'
|
||||
labels: null
|
||||
name: my-project
|
||||
org_id: null
|
||||
project_id: my-project
|
||||
skip_delete: false
|
||||
timeouts: null
|
||||
module.project.google_project_iam_policy.authoritative[0]:
|
||||
policy_data: '{"auditConfigs":[{"auditLogConfigs":[{"exemptedMembers":["group:organization-admins@example.org"],"logType":"ADMIN_READ"}],"service":"allServices"},{"auditLogConfigs":[{"logType":"DATA_WRITE"},{"logType":"DATA_READ"}],"service":"storage.googleapis.com"}],"bindings":[{"members":["group:org-admins@example.com"],"role":"roles/owner"},{"members":["group:org-admins@example.com"],"role":"roles/resourcemanager.folderAdmin"},{"members":["group:org-admins@example.com"],"role":"roles/resourcemanager.organizationAdmin"},{"members":["group:org-admins@example.com"],"role":"roles/resourcemanager.projectCreator"}]}'
|
||||
project: my-project
|
||||
|
||||
counts:
|
||||
google_project: 1
|
||||
google_project_iam_policy: 1
|
||||
modules: 1
|
||||
resources: 2
|
||||
46
tests/modules/project/examples/logging-data-access.yaml
Normal file
46
tests/modules/project/examples/logging-data-access.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
values:
|
||||
module.project.google_project.project[0]:
|
||||
auto_create_network: false
|
||||
billing_account: 123456-123456-123456
|
||||
folder_id: '1234567890'
|
||||
labels: null
|
||||
name: my-project
|
||||
org_id: null
|
||||
project_id: my-project
|
||||
skip_delete: false
|
||||
timeouts: null
|
||||
module.project.google_project_iam_audit_config.default["allServices"]:
|
||||
audit_log_config:
|
||||
- exempted_members:
|
||||
- group:organization-admins@example.org
|
||||
log_type: ADMIN_READ
|
||||
project: my-project
|
||||
service: allServices
|
||||
module.project.google_project_iam_audit_config.default["storage.googleapis.com"]:
|
||||
audit_log_config:
|
||||
- exempted_members: []
|
||||
log_type: DATA_READ
|
||||
- exempted_members: []
|
||||
log_type: DATA_WRITE
|
||||
project: my-project
|
||||
service: storage.googleapis.com
|
||||
|
||||
counts:
|
||||
google_project: 1
|
||||
google_project_iam_audit_config: 2
|
||||
modules: 1
|
||||
resources: 3
|
||||
Reference in New Issue
Block a user