| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** 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: "Vertex AI" |
| description: |- |
| Vertex AI Feature Group. |
| --- |
| |
| # google\_vertex\_ai\_feature\_group |
| |
| Vertex AI Feature Group. |
| |
| |
| To get more information about FeatureGroup, see: |
| |
| * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featureGroups) |
| * How-to Guides |
| * [Creating a Feature Group](https://cloud.google.com/vertex-ai/docs/featurestore/latest/create-featuregroup) |
| |
| <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=vertex_ai_feature_group&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 - Vertex Ai Feature Group |
| |
| |
| ```hcl |
| resource "google_vertex_ai_feature_group" "feature_group" { |
| name = "example_feature_group" |
| description = "A sample feature group" |
| region = "us-central1" |
| labels = { |
| label-one = "value-one" |
| } |
| big_query { |
| big_query_source { |
| # The source table must have a column named 'feature_timestamp' of type TIMESTAMP. |
| input_uri = "bq://${google_bigquery_table.sample_table.project}.${google_bigquery_table.sample_table.dataset_id}.${google_bigquery_table.sample_table.table_id}" |
| } |
| entity_id_columns = ["feature_id"] |
| } |
| } |
| |
| resource "google_bigquery_dataset" "sample_dataset" { |
| dataset_id = "job_load_dataset" |
| friendly_name = "test" |
| description = "This is a test description" |
| location = "US" |
| } |
| |
| resource "google_bigquery_table" "sample_table" { |
| deletion_protection = false |
| dataset_id = google_bigquery_dataset.sample_dataset.dataset_id |
| table_id = "job_load_table" |
| |
| schema = <<EOF |
| [ |
| { |
| "name": "feature_id", |
| "type": "STRING", |
| "mode": "NULLABLE" |
| }, |
| { |
| "name": "feature_timestamp", |
| "type": "TIMESTAMP", |
| "mode": "NULLABLE" |
| } |
| ] |
| EOF |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| |
| - - - |
| |
| |
| * `name` - |
| (Optional) |
| The resource name of the Feature Group. |
| |
| * `labels` - |
| (Optional) |
| The labels with user-defined metadata to organize your FeatureGroup. |
| **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. |
| Please refer to the field `effective_labels` for all of the labels present on the resource. |
| |
| * `description` - |
| (Optional) |
| The description of the FeatureGroup. |
| |
| * `big_query` - |
| (Optional) |
| Indicates that features for this group come from BigQuery Table/View. By default treats the source as a sparse time series source, which is required to have an entityId and a feature_timestamp column in the source. |
| Structure is [documented below](#nested_big_query). |
| |
| * `region` - |
| (Optional) |
| The region of feature group. eg us-central1 |
| |
| * `project` - (Optional) The ID of the project in which the resource belongs. |
| If it is not provided, the provider project is used. |
| |
| |
| <a name="nested_big_query"></a>The `big_query` block supports: |
| |
| * `big_query_source` - |
| (Required) |
| The BigQuery source URI that points to either a BigQuery Table or View. |
| Structure is [documented below](#nested_big_query_source). |
| |
| * `entity_id_columns` - |
| (Optional) |
| Columns to construct entityId / row keys. Currently only supports 1 entity_id_column. If not provided defaults to entityId. |
| |
| |
| <a name="nested_big_query_source"></a>The `big_query_source` block supports: |
| |
| * `input_uri` - |
| (Required) |
| BigQuery URI to a table, up to 2000 characters long. For example: `bq://projectId.bqDatasetId.bqTableId.` |
| |
| ## 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/{{region}}/featureGroups/{{name}}` |
| |
| * `create_time` - |
| The timestamp of when the FeatureGroup was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. |
| |
| * `update_time` - |
| The timestamp of when the FeatureGroup was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. |
| |
| * `etag` - |
| Used to perform consistent read-modify-write updates. |
| |
| * `terraform_labels` - |
| The combination of labels configured directly on the resource |
| and default labels configured on the provider. |
| |
| * `effective_labels` - |
| All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. |
| |
| |
| ## 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 |
| |
| |
| FeatureGroup can be imported using any of these accepted formats: |
| |
| * `projects/{{project}}/locations/{{region}}/featureGroups/{{name}}` |
| * `{{project}}/{{region}}/{{name}}` |
| * `{{region}}/{{name}}` |
| * `{{name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import FeatureGroup using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}/locations/{{region}}/featureGroups/{{name}}" |
| to = google_vertex_ai_feature_group.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), FeatureGroup can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_vertex_ai_feature_group.default projects/{{project}}/locations/{{region}}/featureGroups/{{name}} |
| $ terraform import google_vertex_ai_feature_group.default {{project}}/{{region}}/{{name}} |
| $ terraform import google_vertex_ai_feature_group.default {{region}}/{{name}} |
| $ terraform import google_vertex_ai_feature_group.default {{name}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |