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

Data Catalog tag template #3555

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 6 additions & 1 deletion products/datacatalog/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ objects:
base_url: projects/{{project}}/locations/{{region}}/tagTemplates
self_link: "{{name}}"
create_url: projects/{{project}}/locations/{{region}}/tagTemplates?tagTemplateId={{tag_template_id}}
delete_url: "{{name}}?force=true"
delete_url: "{{name}}?force={{force_delete}}"
update_verb: :PATCH
update_mask: true
description: |
Expand All @@ -302,6 +302,11 @@ objects:
input: true
description: |
The id of the tag template to create.
- !ruby/object:Api::Type::Boolean
name: forceDelete
url_param_only: true
description: |
This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
properties:
- !ruby/object:Api::Type::String
name: name
Expand Down
5 changes: 5 additions & 0 deletions products/datacatalog/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ overrides: !ruby/object:Overrides::ResourceOverrides
primary_resource_id: "basic_tag_template"
vars:
tag_template_id: "my_template"
force_delete: "false"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for the docs, correct? do we want to put false in there yet before it's supported by the API? I don't have a strong opinion either way, just wanted to check thoughts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, same rationale here as the bigtable one where I prefer to recommend the safer option for users and make them explicitly have to switch over to the one that lets them delete the resource when they decide to do so.

test_vars_overrides:
force_delete: "true"
oics_vars_overrides:
force_delete: "true"
properties:
tagTemplateId: !ruby/object:Overrides::Terraform::PropertyOverride
validation: !ruby/object:Provider::Terraform::Validation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ resource "google_data_catalog_tag_template" "<%= ctx[:primary_resource_id] %>" {
}
}
}

force_delete = "<%= ctx[:vars]['force_delete'] %>"
}