Skip to content

Commit 38b21b2

Browse files
g-awmalikdavenportjw
andauthoredJun 14, 2023
feat: adds metadata generation for the blueprint (#220)
Co-authored-by: davenportjw <jasondavenport@google.com>
1 parent d081ef9 commit 38b21b2

11 files changed

+780
-382
lines changed
 

‎Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ SHELL := /usr/bin/env bash
2121
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.13
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
24+
ENABLE_BPMETADATA := 1
25+
export ENABLE_BPMETADATA
2426

2527
# Enter docker container for local development
2628
.PHONY: docker_run
@@ -68,6 +70,7 @@ docker_test_integration:
6870
.PHONY: docker_test_lint
6971
docker_test_lint:
7072
docker run --rm -it \
73+
-e ENABLE_BPMETADATA \
7174
-v $(CURDIR):/workspace \
7275
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
7376
/usr/local/bin/test_lint.sh
@@ -76,9 +79,10 @@ docker_test_lint:
7679
.PHONY: docker_generate_docs
7780
docker_generate_docs:
7881
docker run --rm -it \
82+
-e ENABLE_BPMETADATA \
7983
-v $(CURDIR):/workspace \
8084
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
81-
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs'
85+
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs -d'
8286

8387
# Alias for backwards compatibility
8488
.PHONY: generate_docs

‎metadata.display.yaml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: blueprints.cloud.google.com/v1alpha1
16+
kind: BlueprintMetadata
17+
metadata:
18+
name: terraform-google-bigquery-display
19+
annotations:
20+
config.kubernetes.io/local-config: "true"
21+
spec:
22+
info:
23+
title: terraform-google-bigquery
24+
source:
25+
repo: https://github.com/terraform-google-modules/terraform-google-bigquery
26+
sourceType: git
27+
ui:
28+
input:
29+
variables:
30+
access:
31+
name: access
32+
title: Access
33+
dataset_id:
34+
name: dataset_id
35+
title: Dataset Id
36+
dataset_labels:
37+
name: dataset_labels
38+
title: Dataset Labels
39+
dataset_name:
40+
name: dataset_name
41+
title: Dataset Name
42+
default_table_expiration_ms:
43+
name: default_table_expiration_ms
44+
title: Default Table Expiration Ms
45+
delete_contents_on_destroy:
46+
name: delete_contents_on_destroy
47+
title: Delete Contents On Destroy
48+
deletion_protection:
49+
name: deletion_protection
50+
title: Deletion Protection
51+
description:
52+
name: description
53+
title: Description
54+
encryption_key:
55+
name: encryption_key
56+
title: Encryption Key
57+
external_tables:
58+
name: external_tables
59+
title: External Tables
60+
location:
61+
name: location
62+
title: Location
63+
materialized_views:
64+
name: materialized_views
65+
title: Materialized Views
66+
max_time_travel_hours:
67+
name: max_time_travel_hours
68+
title: Max Time Travel Hours
69+
project_id:
70+
name: project_id
71+
title: Project Id
72+
routines:
73+
name: routines
74+
title: Routines
75+
tables:
76+
name: tables
77+
title: Tables
78+
views:
79+
name: views
80+
title: Views

0 commit comments

Comments
 (0)
Please sign in to comment.