blob: e599eeecbfdc0d2db15201ce915db7d4a5cc81e3 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Bigquery Analytics Hub"
description: |-
A Bigquery Analytics Hub data exchange
---
# google\_bigquery\_analytics\_hub\_data\_exchange
A Bigquery Analytics Hub data exchange
To get more information about DataExchange, see:
* [API documentation](https://cloud.google.com/bigquery/docs/reference/analytics-hub/rest/v1/projects.locations.dataExchanges)
* How-to Guides
* [Official Documentation](https://cloud.google.com/bigquery/docs/analytics-hub-introduction)
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=bigquery_analyticshub_data_exchange_basic&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Bigquery Analyticshub Data Exchange Basic
```hcl
resource "google_bigquery_analytics_hub_data_exchange" "data_exchange" {
location = "US"
data_exchange_id = "my_data_exchange"
display_name = "my_data_exchange"
description = "example data exchange"
}
```
## Argument Reference
The following arguments are supported:
* `data_exchange_id` -
(Required)
The ID of the data exchange. Must contain only Unicode letters, numbers (0-9), underscores (_). Should not use characters that require URL-escaping, or characters outside of ASCII, spaces.
* `location` -
(Required)
The name of the location this data exchange.
* `display_name` -
(Required)
Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and must not start or end with spaces.
- - -
* `description` -
(Optional)
Description of the data exchange.
* `primary_contact` -
(Optional)
Email or URL of the primary point of contact of the data exchange.
* `documentation` -
(Optional)
Documentation describing the data exchange.
* `icon` -
(Optional)
Base64 encoded image representing the data exchange.
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}`
* `name` -
The resource name of the data exchange, for example:
"projects/myproject/locations/US/dataExchanges/123"
* `listing_count` -
Number of listings contained in the data exchange.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.
## Import
DataExchange can be imported using any of these accepted formats:
* `projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}`
* `{{project}}/{{location}}/{{data_exchange_id}}`
* `{{location}}/{{data_exchange_id}}`
* `{{data_exchange_id}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import DataExchange using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}"
to = google_bigquery_analytics_hub_data_exchange.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), DataExchange can be imported using one of the formats above. For example:
```
$ terraform import google_bigquery_analytics_hub_data_exchange.default projects/{{project}}/locations/{{location}}/dataExchanges/{{data_exchange_id}}
$ terraform import google_bigquery_analytics_hub_data_exchange.default {{project}}/{{location}}/{{data_exchange_id}}
$ terraform import google_bigquery_analytics_hub_data_exchange.default {{location}}/{{data_exchange_id}}
$ terraform import google_bigquery_analytics_hub_data_exchange.default {{data_exchange_id}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).