You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.
terraform {
required_version=">= 1.3"required_providers {
google={
source ="hashicorp/google"
version =">= 5.10.0"
}
}
}
resource"google_data_catalog_entry""entry1" {
entry_group=google_data_catalog_entry_group.entry_group1.identry_id="my_entry"user_specified_type="my_custom_type"user_specified_system="SomethingExternal"
}
resource"google_data_catalog_entry_group""entry_group1" {
entry_group_id="my_entry_group"
}
resource"google_data_catalog_tag_template""tag_template1" {
tag_template_id="my_template"region="us-central1"display_name="Demo Tag Template"fields {
field_id="bool_field"display_name="Number of rows in the data assets"type {
primitive_type="BOOL"
}
order=1# must be other than 0 to reproduce
}
fields {
field_id="string_field"display_name="String values"type {
primitive_type="STRING"
}
order=0
}
force_delete="true"
}
resource"google_data_catalog_tag""basic_tag_wh" {
parent=google_data_catalog_entry.entry1.idtemplate=google_data_catalog_tag_template.tag_template1.idfields {
field_name="bool_field"bool_value=false
}
fields {
field_name="string_field"string_value="fnord"# change value AFTER first application and then re-apply to reproduce the issue
}
}
Apply above, then change to version below and re-apply:
terraform {
required_version=">= 1.3"required_providers {
google={
source ="hashicorp/google"
version =">= 5.10.0"
}
}
}
resource"google_data_catalog_entry""entry1" {
entry_group=google_data_catalog_entry_group.entry_group1.identry_id="my_entry"user_specified_type="my_custom_type"user_specified_system="SomethingExternal"
}
resource"google_data_catalog_entry_group""entry_group1" {
entry_group_id="my_entry_group"
}
resource"google_data_catalog_tag_template""tag_template1" {
tag_template_id="my_template"region="us-central1"display_name="Demo Tag Template"fields {
field_id="bool_field"display_name="Number of rows in the data assets"type {
primitive_type="BOOL"
}
order=1# must be other than 0 to reproduce
}
fields {
field_id="string_field"display_name="String values"type {
primitive_type="STRING"
}
order=0
}
force_delete="true"
}
resource"google_data_catalog_tag""basic_tag_wh" {
parent=google_data_catalog_entry.entry1.idtemplate=google_data_catalog_tag_template.tag_template1.idfields {
field_name="bool_field"bool_value=false
}
fields {
field_name="string_field"string_value="fnord2"# change value AFTER first application and then re-apply to reproduce the issue
}
}
Tag should be updated - a request with both string field and bool field should be sent to API.
Actual Behavior
Provider sends a request without bool_value field for boolean field causing error response. This only occurs if bool-type field is NOT changed and string type field is modified.
this function removes bool_value field when preparing the request - it does work fine as long as order field is not present in the tag (or is set to 0). Function should count only the keys which names end with "Value" instead of all the keys in the field object.
Steps to Reproduce
terraform apply
Change string tag value to any other
terraform apply
Important Factoids
References
#0000
b/318665506
The text was updated successfully, but these errors were encountered:
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.4.6
on darwin_amd64
Affected Resource(s)
Terraform Configuration Files
Apply above, then change to version below and re-apply:
Debug Output
https://gist.github.com/whryniewski/6da96db8a2d98266293a0eadb3fb0526
Panic Output
Expected Behavior
Tag should be updated - a request with both string field and bool field should be sent to API.
Actual Behavior
Provider sends a request without bool_value field for boolean field causing error response. This only occurs if bool-type field is NOT changed and string type field is modified.
It seems that
terraform-provider-google/google/services/datacatalog/resource_data_catalog_tag.go
Line 611 in f48e879
order
field is not present in the tag (or is set to 0). Function should count only the keys which names end with "Value" instead of all the keys in the field object.Steps to Reproduce
terraform apply
terraform apply
Important Factoids
References
b/318665506
The text was updated successfully, but these errors were encountered: