Skip to content

Commit

Permalink
datacatalog - bump Taxonomy and PolicyTag to ga (#6989)
Browse files Browse the repository at this point in the history
* update Taxonomy and PolicyTag to ga

* update Taxonomy and PolicyTag to ga

* refactor

* refactor
  • Loading branch information
DrFaust92 authored Feb 27, 2023
1 parent 0f67bb4 commit 02108d4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 15 deletions.
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\"])"
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

0 comments on commit 02108d4

Please sign in to comment.