-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixes lint issues and generates metadata (#117)
- Loading branch information
Showing
9 changed files
with
291 additions
and
22 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
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
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
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 |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# 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. | ||
|
||
apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
kind: BlueprintMetadata | ||
metadata: | ||
name: terraform-google-pubsub | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
spec: | ||
title: terraform-google-pubsub | ||
source: | ||
repo: https://github.com/terraform-google-modules/terraform-google-pubsub | ||
sourceType: git | ||
version: 4.0.1 | ||
actuationTool: | ||
type: Terraform | ||
version: '>= 0.13' | ||
subBlueprints: | ||
- name: cloudiot | ||
location: modules/cloudiot | ||
examples: | ||
- name: bigquery | ||
location: examples/bigquery | ||
- name: cloudiot | ||
location: examples/cloudiot | ||
- name: kms | ||
location: examples/kms | ||
- name: simple | ||
location: examples/simple | ||
- name: subscriptions_only | ||
location: examples/subscriptions_only | ||
variables: | ||
- name: bigquery_subscriptions | ||
description: The list of the bigquery push subscriptions. | ||
type: list(map(string)) | ||
default: [] | ||
required: false | ||
- name: create_subscriptions | ||
description: Specify true if you want to create subscriptions. | ||
type: bool | ||
default: true | ||
required: false | ||
- name: create_topic | ||
description: Specify true if you want to create a topic. | ||
type: bool | ||
default: true | ||
required: false | ||
- name: grant_token_creator | ||
description: Specify true if you want to add token creator role to the default Pub/Sub SA. | ||
type: bool | ||
default: true | ||
required: false | ||
- name: message_storage_policy | ||
description: A map of storage policies. Default - inherit from organization's Resource Location Restriction policy. | ||
type: map(any) | ||
default: {} | ||
required: false | ||
- name: project_id | ||
description: The project ID to manage the Pub/Sub resources. | ||
type: string | ||
required: true | ||
- name: pull_subscriptions | ||
description: The list of the pull subscriptions. | ||
type: list(map(string)) | ||
default: [] | ||
required: false | ||
- name: push_subscriptions | ||
description: The list of the push subscriptions. | ||
type: list(map(string)) | ||
default: [] | ||
required: false | ||
- name: schema | ||
description: Schema for the topic. | ||
type: |- | ||
object({ | ||
name = string | ||
type = string | ||
definition = string | ||
encoding = string | ||
}) | ||
required: false | ||
- name: subscription_labels | ||
description: A map of labels to assign to every Pub/Sub subscription. | ||
type: map(string) | ||
default: {} | ||
required: false | ||
- name: topic | ||
description: The Pub/Sub topic name. | ||
type: string | ||
required: true | ||
- name: topic_kms_key_name | ||
description: The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. | ||
type: string | ||
required: false | ||
- name: topic_labels | ||
description: A map of labels to assign to the Pub/Sub topic. | ||
type: map(string) | ||
default: {} | ||
required: false | ||
- name: topic_message_retention_duration | ||
description: The minimum duration in seconds to retain a message after it is published to the topic. | ||
type: string | ||
required: false | ||
outputs: | ||
- name: id | ||
description: The ID of the Pub/Sub topic | ||
- name: subscription_names | ||
description: The name list of Pub/Sub subscriptions | ||
- name: subscription_paths | ||
description: The path list of Pub/Sub subscriptions | ||
- name: topic | ||
description: The name of the Pub/Sub topic | ||
- name: topic_labels | ||
description: Labels assigned to the Pub/Sub topic | ||
- name: uri | ||
description: The URI of the Pub/Sub topic | ||
roles: | ||
- level: Project | ||
roles: | ||
- roles/cloudiot.admin | ||
- roles/pubsub.admin | ||
- roles/resourcemanager.projectIamAdmin | ||
- roles/bigquery.admin | ||
services: | ||
- cloudiot.googleapis.com | ||
- cloudresourcemanager.googleapis.com | ||
- pubsub.googleapis.com | ||
- serviceusage.googleapis.com | ||
- bigquery.googleapis.com |
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 |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# 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. | ||
|
||
apiVersion: blueprints.cloud.google.com/v1alpha1 | ||
kind: BlueprintMetadata | ||
metadata: | ||
name: terraform-google-pubsub | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
spec: | ||
title: terraform-google-pubsub for Cloud IoT | ||
source: | ||
repo: https://github.com/terraform-google-modules/terraform-google-pubsub | ||
sourceType: git | ||
version: 4.0.1 | ||
actuationTool: | ||
type: Terraform | ||
version: '>= 0.13' | ||
examples: | ||
- name: bigquery | ||
location: examples/bigquery | ||
- name: cloudiot | ||
location: examples/cloudiot | ||
- name: kms | ||
location: examples/kms | ||
- name: simple | ||
location: examples/simple | ||
- name: subscriptions_only | ||
location: examples/subscriptions_only | ||
variables: | ||
- name: event_notification_config | ||
description: The event notification configuration for the Cloud IoT registry. This contains `topic`, `topic_labels`, `pull_subscriptions` and `push_subscriptions` and `create_topic`. | ||
type: |- | ||
object({ | ||
topic = string | ||
topic_labels = map(string) | ||
push_subscriptions = list(map(string)) | ||
pull_subscriptions = list(map(string)) | ||
create_topic = bool | ||
}) | ||
default: | ||
create_topic: false | ||
pull_subscriptions: [] | ||
push_subscriptions: [] | ||
topic: "" | ||
topic_labels: {} | ||
required: false | ||
- name: http_enabled_state | ||
description: The field allows HTTP_ENABLED or HTTP_DISABLED | ||
type: string | ||
default: HTTP_DISABLED | ||
required: false | ||
- name: mqtt_enabled_state | ||
description: The field allows MQTT_ENABLED or MQTT_DISABLED | ||
type: string | ||
default: MQTT_ENABLED | ||
required: false | ||
- name: name | ||
description: The Cloud IoT registry name | ||
type: string | ||
required: true | ||
- name: project_id | ||
description: The project ID to manage the Cloud IoT resources | ||
type: string | ||
required: true | ||
- name: public_key_certificates | ||
description: The list for public key certificates | ||
type: list(object({ format = string, certificate = string })) | ||
default: [] | ||
required: false | ||
- name: region | ||
description: The region to host the registry | ||
type: string | ||
required: true | ||
- name: state_notification_config | ||
description: The state notification configuration for the Cloud IoT registry. This contains `topic`, `topic_labels`, `pull_subscriptions` and `push_subscriptions` and `create_topic`. | ||
type: |- | ||
object({ | ||
topic = string | ||
topic_labels = map(string) | ||
push_subscriptions = list(map(string)) | ||
pull_subscriptions = list(map(string)) | ||
create_topic = bool | ||
}) | ||
default: | ||
create_topic: false | ||
pull_subscriptions: [] | ||
push_subscriptions: [] | ||
topic: "" | ||
topic_labels: {} | ||
required: false | ||
outputs: | ||
- name: credentials | ||
description: The credentials for Cloud IoT registry | ||
- name: event_notification_subscription_names | ||
description: The name list of Pub/Sub subscriptions associated with the registry | ||
- name: event_notification_subscription_paths | ||
description: The path list of Pub/Sub subscriptions associated with the registry | ||
- name: event_notification_topic | ||
description: The name of the Pub/Sub topic associated with the registry | ||
- name: event_notification_topic_id | ||
description: The id of the Pub/Sub topic associated with the registry | ||
- name: name | ||
description: The name of the Cloud IoT registry | ||
- name: region | ||
description: The region of the Cloud IoT registry | ||
- name: registry | ||
description: The registry being created by this module | ||
- name: state_notification_subscription_names | ||
description: The name list of Pub/Sub subscriptions associated with the registry | ||
- name: state_notification_subscription_paths | ||
description: The path list of Pub/Sub subscriptions associated with the registry | ||
- name: state_notification_topic | ||
description: The name of the Pub/Sub topic associated with the registry | ||
- name: state_notification_topic_id | ||
description: The id of the Pub/Sub topic associated with the registry | ||
roles: | ||
- level: Project | ||
roles: | ||
- roles/cloudiot.admin | ||
- roles/pubsub.admin | ||
- roles/resourcemanager.projectIamAdmin | ||
- roles/bigquery.admin | ||
services: | ||
- cloudiot.googleapis.com | ||
- cloudresourcemanager.googleapis.com | ||
- pubsub.googleapis.com | ||
- serviceusage.googleapis.com | ||
- bigquery.googleapis.com |
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