Skip to content

Commit ef1b35c

Browse files
authored
feat: adds metadata generation for the blueprint (#34)
1 parent 2259470 commit ef1b35c

5 files changed

Lines changed: 162 additions & 1 deletion

File tree

.gitIgnore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Session.vim
3737

3838
# Local .terraform directories
3939
**/.terraform/*
40+
**/.terraform.lock.*
4041

4142
# .tfstate files
4243
*.tfstate

Makefile

Lines changed: 5 additions & 1 deletion
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
-e EXCLUDE_LINT_DIRS \
7275
-v "$(CURDIR)":/workspace \
7376
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
@@ -77,9 +80,10 @@ docker_test_lint:
7780
.PHONY: docker_generate_docs
7881
docker_generate_docs:
7982
docker run --rm -it \
83+
-e ENABLE_BPMETADATA \
8084
-v "$(CURDIR)":/workspace \
8185
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
82-
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs'
86+
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs -d'
8387

8488
# Alias for backwards compatibility
8589
.PHONY: generate_docs

metadata.display.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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-analytics-lakehouse-display
19+
spec:
20+
info:
21+
title: terraform-google-lakehouse
22+
source:
23+
repo: https://github.com/GoogleCloudPlatform/terraform-google-analytics-lakehouse.git
24+
sourceType: git
25+
ui:
26+
input:
27+
variables:
28+
deletion_protection:
29+
name: deletion_protection
30+
title: Deletion Protection
31+
enable_apis:
32+
name: enable_apis
33+
title: Enable Apis
34+
force_destroy:
35+
name: force_destroy
36+
title: Force Destroy
37+
labels:
38+
name: labels
39+
title: Labels
40+
project_id:
41+
name: project_id
42+
title: Project Id
43+
public_data_bucket:
44+
name: public_data_bucket
45+
title: Public Data Bucket
46+
region:
47+
name: region
48+
title: Region
49+
use_case_short:
50+
name: use_case_short
51+
title: Use Case Short

metadata.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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-analytics-lakehouse
19+
annotations:
20+
config.kubernetes.io/local-config: "true"
21+
spec:
22+
info:
23+
title: terraform-google-lakehouse
24+
source:
25+
repo: https://github.com/GoogleCloudPlatform/terraform-google-analytics-lakehouse.git
26+
sourceType: git
27+
version: 0.1.0
28+
actuationTool:
29+
flavor: Terraform
30+
version: '>= 0.13'
31+
description: {}
32+
content:
33+
documentation:
34+
- title: Create an Analytics Lakehouse
35+
url: https://cloud.google.com/architecture/big-data-analytics/analytics-lakehouse
36+
examples:
37+
- name: analytics_lakehouse
38+
location: examples/analytics_lakehouse
39+
interfaces:
40+
variables:
41+
- name: deletion_protection
42+
description: Whether or not to protect GCS resources from deletion when solution is modified or changed.
43+
varType: string
44+
defaultValue: true
45+
- name: enable_apis
46+
description: Whether or not to enable underlying apis in this solution. .
47+
varType: string
48+
defaultValue: true
49+
- name: force_destroy
50+
description: Whether or not to protect BigQuery resources from deletion when solution is modified or changed.
51+
varType: string
52+
defaultValue: false
53+
- name: labels
54+
description: A map of labels to apply to contained resources.
55+
varType: map(string)
56+
defaultValue:
57+
analytics-lakehouse: true
58+
- name: project_id
59+
description: Google Cloud Project ID
60+
varType: string
61+
required: true
62+
- name: public_data_bucket
63+
description: Public Data bucket for access
64+
varType: string
65+
defaultValue: data-analytics-demos
66+
- name: region
67+
description: Google Cloud Region
68+
varType: string
69+
defaultValue: us-central1
70+
- name: use_case_short
71+
description: Short name for use case
72+
varType: string
73+
defaultValue: lakehouse
74+
outputs:
75+
- name: bigquery_editor_url
76+
description: The URL to launch the BigQuery editor
77+
- name: lakehouse_colab_url
78+
description: The URL to launch the in-console tutorial for the Analytics Lakehouse solution
79+
- name: lookerstudio_report_url
80+
description: The URL to create a new Looker Studio report displays a sample dashboard for data analysis
81+
- name: neos_tutorial_url
82+
description: The URL to launch the in-console tutorial for the Analytics Lakehouse solution
83+
- name: workflow_return_project_setup
84+
description: Output of the project setup workflow
85+
requirements:
86+
roles:
87+
- level: Project
88+
roles:
89+
- roles/owner
90+
services:
91+
- cloudkms.googleapis.com
92+
- cloudresourcemanager.googleapis.com
93+
- bigquery.googleapis.com
94+
- bigquerystorage.googleapis.com
95+
- bigqueryconnection.googleapis.com
96+
- serviceusage.googleapis.com
97+
- iam.googleapis.com

test/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
source.sh
2+
3+
# Local .terraform directories
4+
**/.terraform/*
5+
**/.terraform.lock.*
6+
7+
# .tfstate files
8+
*.tfstate
9+
*.tfstate.*

0 commit comments

Comments
 (0)