diff --git a/mmv1/products/metastore/api.yaml b/mmv1/products/metastore/api.yaml index 9515f5fce842..739045b0c2c4 100644 --- a/mmv1/products/metastore/api.yaml +++ b/mmv1/products/metastore/api.yaml @@ -314,6 +314,19 @@ objects: required: true description: | Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog. + - !ruby/object:Api::Type::NestedObject + name: "telemetryConfig" + description: | + The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON. + properties: + - !ruby/object:Api::Type::Enum + name: "logFormat" + default_value: :JSON + description: | + The output format of the Dataproc Metastore service's logs. + values: + - :LEGACY + - :JSON - !ruby/object:Api::Resource name: 'Federation' min_version: beta diff --git a/mmv1/products/metastore/terraform.yaml b/mmv1/products/metastore/terraform.yaml index e87891836063..02da46b748c7 100644 --- a/mmv1/products/metastore/terraform.yaml +++ b/mmv1/products/metastore/terraform.yaml @@ -68,6 +68,12 @@ overrides: !ruby/object:Overrides::ResourceOverrides metastore_service_name: "metastore-srv" network_name: "my-network" subnet_name: "my-subnetwork" + - !ruby/object:Provider::Terraform::Examples + name: "dataproc_metastore_service_telemetry" + skip_docs: true + primary_resource_id: "telemetry" + vars: + metastore_service_name: "telemetry" properties: network: !ruby/object:Overrides::Terraform::PropertyOverride default_from_api: true @@ -78,6 +84,8 @@ overrides: !ruby/object:Overrides::ResourceOverrides hiveMetastoreConfig.configOverrides: !ruby/object:Overrides::Terraform::PropertyOverride default_from_api: true diff_suppress_func: "dataprocMetastoreServiceOverrideSuppress" + telemetryConfig: !ruby/object:Overrides::Terraform::PropertyOverride + default_from_api: true Federation: !ruby/object:Overrides::Terraform::ResourceOverride autogen_async: true import_format: ["projects/{{project}}/locations/{{location}}/federations/{{federation_id}}"] diff --git a/mmv1/templates/terraform/examples/dataproc_metastore_service_telemetry.tf.erb b/mmv1/templates/terraform/examples/dataproc_metastore_service_telemetry.tf.erb new file mode 100644 index 000000000000..91d804028fa6 --- /dev/null +++ b/mmv1/templates/terraform/examples/dataproc_metastore_service_telemetry.tf.erb @@ -0,0 +1,14 @@ +resource "google_dataproc_metastore_service" "<%= ctx[:primary_resource_id] %>" { + service_id = "<%= ctx[:vars]['metastore_service_name'] %>" + location = "us-central1" + port = 9080 + tier = "DEVELOPER" + + hive_metastore_config { + version = "3.1.2" + } + + telemetry_config { + log_format = "LEGACY" + } +} \ No newline at end of file