Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions mmv1/products/dataplex/Term.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Copyright 2024 Google Inc.
# 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.

name: 'Term'
description: |
Represents a collection of terms within a Glossary that are related to each other.
base_url: 'projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}}/terms/{{term_id}}'
self_link: 'projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}}/terms/{{term_id}}'
create_url: 'projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}}/terms?term_id={{term_id}}'
update_verb: 'PATCH'
update_mask: true
timeouts:
insert_minutes: 5
update_minutes: 5
delete_minutes: 5
autogen_async: true
import_format: ['projects/{{project}}/locations/{{location}}/glossaries/{{glossary_id}}/terms/{{term_id}}']
examples:
- name: 'dataplex_term_basic'
primary_resource_id: 'term_test_id'
primary_resource_name: 'fmt.Sprintf("tf-test-term-basic%s", context["random_suffix"]), fmt.Sprintf("tf-test-glossary%s", context["random_suffix"])'
vars:
term_name: 'term-basic'
- name: 'dataplex_term_full'
primary_resource_id: 'term_test_id_full'
primary_resource_name: 'fmt.Sprintf("tf-test-term-full%s", context["random_suffix"]), fmt.Sprintf("tf-test-glossary%s", context["random_suffix"])'
vars:
term_name: 'term-full'
parameters:
- name: 'location'
type: String
description: |
The location where the glossary term should reside.
url_param_only: true
required: true
immutable: true
- name: 'glossaryId'
type: String
description: |
The glossary id for creation.
url_param_only: true
immutable: true
- name: 'termId'
type: String
description: |
The term id for creation.
url_param_only: true
immutable: true
properties:
- name: 'name'
type: String
description: |
The resource name of the GlossaryTerm. Format: projects/{projectId}/locations/{locationId}/glossaries/{glossaryId}/categories/{termId}
output: true
- name: 'displayName'
type: String
description: |
User friendly display name of the GlossaryTerm. This is user-mutable. This will be same as the termId, if not specified.
required: false
- name: 'description'
type: String
description: |
The user-mutable description of the GlossaryTerm.
required: false
- name: 'labels'
type: KeyValueLabels
description: |
User-defined labels for the GlossaryTerm.
required: false
- name: 'uid'
type: String
description: |
System generated unique id for the GlossaryTerm. This ID will be different if the GlossaryTerm is deleted and re-created with the same name.
output: true
- name: 'createTime'
type: Timestamp
description: |
The time at which the GlossaryTerm was created.
output: true
- name: 'updateTime'
type: Timestamp
description: |
The time at which the GlossaryTerm was last updated.
output: true
- name: 'parent'
type: String
description: |
The immediate parent of the GlossaryTerm in the resource-hierarchy. It can either be a Glossary or a Term. Format: projects/{projectId}/locations/{locationId}/glossaries/{glossaryId} OR projects/{projectId}/locations/{locationId}/glossaries/{glossaryId}/terms/{termId}
required: true
11 changes: 11 additions & 0 deletions mmv1/templates/terraform/examples/dataplex_term_basic.tf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "google_dataplex_glossary" "{{$.PrimaryResourceId}}" {
glossary_id = "tf-test-glossary%{random_suffix}"
location = "us-central1"
}

resource "google_dataplex_term" "{{$.PrimaryResourceId}}" {
parent = "projects/${google_dataplex_glossary.term_test_id.project}/locations/us-central1/glossaries/${google_dataplex_glossary.term_test_id.glossary_id}"
glossary_id = google_dataplex_glossary.term_test_id.glossary_id
location = "us-central1"
term_id = "tf-test-term-basic%{random_suffix}"
}
15 changes: 15 additions & 0 deletions mmv1/templates/terraform/examples/dataplex_term_full.tf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "google_dataplex_glossary" "{{$.PrimaryResourceId}}" {
glossary_id = "tf-test-glossary%{random_suffix}"
location = "us-central1"
}

resource "google_dataplex_term" "{{$.PrimaryResourceId}}" {
parent = "projects/${google_dataplex_glossary.term_test_id_full.project}/locations/us-central1/glossaries/${google_dataplex_glossary.term_test_id_full.glossary_id}"
glossary_id = google_dataplex_glossary.term_test_id_full.glossary_id
location = "us-central1"
term_id = "tf-test-term-full%{random_suffix}"

labels = { "tag": "test-tf" }
display_name = "terraform term"
description = "term created by Terraform"
}
Loading