forked from GoogleCloudPlatform/cloud-foundation-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes GoogleCloudPlatform#144: DM/logsink: refactoring
GoogleCloudPlatform#144 - Added version, links to docs - Added support for cross-project resource creation - Fixed resource names
- Loading branch information
Showing
2 changed files
with
88 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,25 @@ | |
info: | ||
title: Logging Sink | ||
author: Sourced Group Inc. | ||
version: 1.0.0 | ||
description: | | ||
Creates a logging sink to export entries to a desired destination. | ||
|
||
For more information on this resource: | ||
- https://cloud.google.com/logging/docs/reference/v2/rest/ | ||
|
||
APIs endpoints used by this template: | ||
- gcp-types/storage-v1:storage.buckets.setIamPolicy => | ||
https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy | ||
- gcp-types/logging-v2:folders.sinks => | ||
https://cloud.google.com/logging/docs/reference/v2/rest/v2/folders.sinks | ||
- gcp-types/logging-v2:billingAccounts.sinks => | ||
https://cloud.google.com/logging/docs/reference/v2/rest/v2/billingAccounts.sinks | ||
- gcp-types/logging-v2:projects.sinks => | ||
https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.sinks | ||
- gcp-types/logging-v2:organizations.sinks => | ||
https://cloud.google.com/logging/docs/reference/v2/rest/v2/organizations.sinks | ||
|
||
imports: | ||
- path: ../pubsub/pubsub.py | ||
name: pubsub.py | ||
|
@@ -32,10 +48,26 @@ required: | |
- destinationType | ||
- destinationName | ||
|
||
oneOf: | ||
- required: | ||
- projectId | ||
- required: | ||
- orgId | ||
- required: | ||
- billingAccountId | ||
- required: | ||
- folderId | ||
|
||
properties: | ||
name: | ||
type: string | ||
description: Name of the sink resource. | ||
description: | | ||
Name of the sink. Resource name would be used if omitted. | ||
project: | ||
type: string | ||
description: | | ||
The project ID of the project containing resources. The | ||
Google apps domain is prefixed if applicable. | ||
destinationName: | ||
type: string | ||
description: | | ||
|
@@ -123,6 +155,30 @@ properties: | |
access: | ||
- role: OWNER | ||
userByEmail: [email protected] | ||
projectId: | ||
type: | ||
- string | ||
- number | ||
description: | | ||
Project ID to add sink to | ||
orgId: | ||
type: | ||
- string | ||
- number | ||
description: | | ||
Org ID to add sink to | ||
billingAccountId: | ||
type: | ||
- string | ||
- number | ||
description: | | ||
Billing account ID to add sink to | ||
folderId: | ||
type: | ||
- string | ||
- number | ||
description: | | ||
Folder ID to add sink to | ||
|
||
documentation: | ||
- templates/logsink/README.md | ||
|