Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datacatalog - bump Taxonomy and PolicyTag to ga #6989

Merged
merged 4 commits into from
Feb 27, 2023
Merged
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
6 changes: 2 additions & 4 deletions mmv1/products/datacatalog/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,14 @@ objects:
name: Taxonomy
base_url: projects/{{project}}/locations/{{region}}/taxonomies
self_link: "{{name}}"
min_version: beta
update_verb: :PATCH
update_mask: true
description: |
A collection of policy tags that classify data along a common axis.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': https://cloud.google.com/data-catalog/docs
api: https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.taxonomies
api: https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.taxonomies
iam_policy: !ruby/object:Api::Resource::IamPolicy
skip_import_test: true
method_name_separator: ':'
Expand Down Expand Up @@ -563,15 +562,14 @@ objects:
name: PolicyTag
base_url: "{{taxonomy}}/policyTags"
self_link: "{{name}}"
min_version: beta
update_verb: :PATCH
update_mask: true
description: |
Denotes one policy tag in a taxonomy.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': https://cloud.google.com/data-catalog/docs
api: https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.taxonomies.policyTags
api: https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.taxonomies.policyTags
iam_policy: !ruby/object:Api::Resource::IamPolicy
skip_import_test: true
method_name_separator: ':'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/datacatalog/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides
primary_resource_id: "basic_taxonomy"
primary_resource_name: "fmt.Sprintf(\"tf_test_my_taxonomy%s\", context[\"random_suffix\"])"
melinath marked this conversation as resolved.
Show resolved Hide resolved
vars:
display_name: "my_display_name"
display_name: "my_taxonomy"
properties:
region: !ruby/object:Overrides::Terraform::PropertyOverride
required: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
resource "google_data_catalog_policy_tag" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
display_name = "Low security"
description = "A policy tag normally associated with low security items"
}

resource "google_data_catalog_taxonomy" "my_taxonomy" {
provider = google-beta
region = "us"
display_name = "<%= ctx[:vars]['taxonomy_display_name'] %>"
description = "A collection of policy tags"
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
resource "google_data_catalog_policy_tag" "parent_policy" {
provider = google-beta
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
display_name = "High"
description = "A policy tag category used for high security access"
}

resource "google_data_catalog_policy_tag" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
display_name = "ssn"
description = "A hash of the users ssn"
parent_policy_tag = google_data_catalog_policy_tag.parent_policy.id
}

resource "google_data_catalog_policy_tag" "child_policy2" {
provider = google-beta
taxonomy = google_data_catalog_taxonomy.my_taxonomy.id
display_name = "dob"
description = "The users date of birth"
Expand All @@ -24,8 +21,6 @@ resource "google_data_catalog_policy_tag" "child_policy2" {
}

resource "google_data_catalog_taxonomy" "my_taxonomy" {
provider = google-beta
region = "us"
display_name = "<%= ctx[:vars]['taxonomy_display_name'] %>"
description = "A collection of policy tags"
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
resource "google_data_catalog_taxonomy" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
region = "us"
display_name = "<%= ctx[:vars]['display_name'] %>"
description = "A collection of policy tags"
activated_policy_types = ["FINE_GRAINED_ACCESS_CONTROL"]
Expand Down