AiFeatureOnlineStoreFeatureview class

FeatureView is representation of values that the FeatureOnlineStore will serve based on its syncConfig.

To get more information about FeatureOnlineStoreFeatureview, see:

Example Usage

Vertex Ai Featureonlinestore Featureview

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", {
    name: "example_feature_view",
    labels: {
        foo: "bar",
    },
    region: "us-central1",
    bigtable: {
        autoScaling: {
            minNodeCount: 1,
            maxNodeCount: 2,
            cpuUtilizationTarget: 80,
        },
    },
});
const tf_test_dataset = new gcp.bigquery.Dataset("tf-test-dataset", {
    datasetId: "example_feature_view",
    friendlyName: "test",
    description: "This is a test description",
    location: "US",
});
const tf_test_table = new gcp.bigquery.Table("tf-test-table", {
    deletionProtection: false,
    datasetId: tf_test_dataset.datasetId,
    tableId: "example_feature_view",
    schema: `  [
  {
    \\"name\\": \\"entity_id\\",
    \\"mode\\": \\"NULLABLE\\",
    \\"type\\": \\"STRING\\",
    \\"description\\": \\"Test default entity_id\\"
  },
    {
    \\"name\\": \\"test_entity_column\\",
    \\"mode\\": \\"NULLABLE\\",
    \\"type\\": \\"STRING\\",
    \\"description\\": \\"test secondary entity column\\"
  },
  {
    \\"name\\": \\"feature_timestamp\\",
    \\"mode\\": \\"NULLABLE\\",
    \\"type\\": \\"TIMESTAMP\\",
    \\"description\\": \\"Default timestamp value\\"
  }
]
`,
});
const featureview = new gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview", {
    name: "example_feature_view",
    region: "us-central1",
    featureOnlineStore: featureonlinestore.name,
    syncConfig: {
        cron: "0 0 * * *",
    },
    bigQuerySource: {
        uri: pulumi.interpolate`bq://${tf_test_table.project}.${tf_test_table.datasetId}.${tf_test_table.tableId}`,
        entityIdColumns: ["test_entity_column"],
    },
});
const project = gcp.organizations.getProject({});
import pulumi
import pulumi_gcp as gcp

featureonlinestore = gcp.vertex.AiFeatureOnlineStore("featureonlinestore",
    name="example_feature_view",
    labels={
        "foo": "bar",
    },
    region="us-central1",
    bigtable={
        "auto_scaling": {
            "min_node_count": 1,
            "max_node_count": 2,
            "cpu_utilization_target": 80,
        },
    })
tf_test_dataset = gcp.bigquery.Dataset("tf-test-dataset",
    dataset_id="example_feature_view",
    friendly_name="test",
    description="This is a test description",
    location="US")
tf_test_table = gcp.bigquery.Table("tf-test-table",
    deletion_protection=False,
    dataset_id=tf_test_dataset.dataset_id,
    table_id="example_feature_view",
    schema="""  [
  {
    \"name\": \"entity_id\",
    \"mode\": \"NULLABLE\",
    \"type\": \"STRING\",
    \"description\": \"Test default entity_id\"
  },
    {
    \"name\": \"test_entity_column\",
    \"mode\": \"NULLABLE\",
    \"type\": \"STRING\",
    \"description\": \"test secondary entity column\"
  },
  {
    \"name\": \"feature_timestamp\",
    \"mode\": \"NULLABLE\",
    \"type\": \"TIMESTAMP\",
    \"description\": \"Default timestamp value\"
  }
]
""")
featureview = gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview",
    name="example_feature_view",
    region="us-central1",
    feature_online_store=featureonlinestore.name,
    sync_config={
        "cron": "0 0 * * *",
    },
    big_query_source={
        "uri": pulumi.Output.all(
            project=tf_test_table.project,
            dataset_id=tf_test_table.dataset_id,
            table_id=tf_test_table.table_id
).apply(lambda resolved_outputs: f"bq://{resolved_outputs['project']}.{resolved_outputs['dataset_id']}.{resolved_outputs['table_id']}")
,
        "entity_id_columns": ["test_entity_column"],
    })
project = gcp.organizations.get_project()
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var featureonlinestore = new Gcp.Vertex.AiFeatureOnlineStore("featureonlinestore", new()
    {
        Name = "example_feature_view",
        Labels =
        {
            { "foo", "bar" },
        },
        Region = "us-central1",
        Bigtable = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreBigtableArgs
        {
            AutoScaling = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreBigtableAutoScalingArgs
            {
                MinNodeCount = 1,
                MaxNodeCount = 2,
                CpuUtilizationTarget = 80,
            },
        },
    });

    var tf_test_dataset = new Gcp.BigQuery.Dataset("tf-test-dataset", new()
    {
        DatasetId = "example_feature_view",
        FriendlyName = "test",
        Description = "This is a test description",
        Location = "US",
    });

    var tf_test_table = new Gcp.BigQuery.Table("tf-test-table", new()
    {
        DeletionProtection = false,
        DatasetId = tf_test_dataset.DatasetId,
        TableId = "example_feature_view",
        Schema = @"  [
  {
    \""name\"": \""entity_id\"",
    \""mode\"": \""NULLABLE\"",
    \""type\"": \""STRING\"",
    \""description\"": \""Test default entity_id\""
  },
    {
    \""name\"": \""test_entity_column\"",
    \""mode\"": \""NULLABLE\"",
    \""type\"": \""STRING\"",
    \""description\"": \""test secondary entity column\""
  },
  {
    \""name\"": \""feature_timestamp\"",
    \""mode\"": \""NULLABLE\"",
    \""type\"": \""TIMESTAMP\"",
    \""description\"": \""Default timestamp value\""
  }
]
",
    });

    var featureview = new Gcp.Vertex.AiFeatureOnlineStoreFeatureview("featureview", new()
    {
        Name = "example_feature_view",
        Region = "us-central1",
        FeatureOnlineStore = featureonlinestore.Name,
        SyncConfig = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs
        {
            Cron = "0 0 * * *",
        },
        BigQuerySource = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs
        {
            Uri = Output.Tuple(tf_test_table.Project, tf_test_table.DatasetId, tf_test_table.TableId).Apply(values =>
            {
                var project = values.Item1;
                var datasetId = values.Item2;
                var tableId = values.Item3;
                return $"bq://{project}.{datasetId}.{tableId}";
            }),
            EntityIdColumns = new[]
            {
                "test_entity_column",
            },
        },
    });

    var project = Gcp.Organizations.GetProject.Invoke();

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vertex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		featureonlinestore, err := vertex.NewAiFeatureOnlineStore(ctx, "featureonlinestore", &vertex.AiFeatureOnlineStoreArgs{
			Name: pulumi.String("example_feature_view"),
			Labels: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			Region: pulumi.String("us-central1"),
			Bigtable: &vertex.AiFeatureOnlineStoreBigtableArgs{
				AutoScaling: &vertex.AiFeatureOnlineStoreBigtableAutoScalingArgs{
					MinNodeCount:         pulumi.Int(1),
					MaxNodeCount:         pulumi.Int(2),
					CpuUtilizationTarget: pulumi.Int(80),
				},
			},
		})
		if err != nil {
			return err
		}
		tf_test_dataset, err := bigquery.NewDataset(ctx, "tf-test-dataset", &bigquery.DatasetArgs{
			DatasetId:    pulumi.String("example_feature_view"),
			FriendlyName: pulumi.String("test"),
			Description:  pulumi.String("This is a test description"),
			Location:     pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		tf_test_table, err := bigquery.NewTable(ctx, "tf-test-table", &bigquery.TableArgs{
			DeletionProtection: pulumi.Bool(false),
			DatasetId:          tf_test_dataset.DatasetId,
			TableId:            pulumi.String("example_feature_view"),
			Schema: pulumi.String(`  [
  {
    \"name\": \"entity_id\",
    \"mode\": \"NULLABLE\",
    \"type\": \"STRING\",
    \"description\": \"Test default entity_id\"
  },
    {
    \"name\": \"test_entity_column\",
    \"mode\": \"NULLABLE\",
    \"type\": \"STRING\",
    \"description\": \"test secondary entity column\"
  },
  {
    \"name\": \"feature_timestamp\",
    \"mode\": \"NULLABLE\",
    \"type\": \"TIMESTAMP\",
    \"description\": \"Default timestamp value\"
  }
]
`),
		})
		if err != nil {
			return err
		}
		_, err = vertex.NewAiFeatureOnlineStoreFeatureview(ctx, "featureview", &vertex.AiFeatureOnlineStoreFeatureviewArgs{
			Name:               pulumi.String("example_feature_view"),
			Region:             pulumi.String("us-central1"),
			FeatureOnlineStore: featureonlinestore.Name,
			SyncConfig: &vertex.AiFeatureOnlineStoreFeatureviewSyncConfigArgs{
				Cron: pulumi.String("0 0 * * *"),
			},
			BigQuerySource: &vertex.AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs{
				Uri: pulumi.All(tf_test_table.Project, tf_test_table.DatasetId, tf_test_table.TableId).ApplyT(func(_args []interface{}) (string, error) {
					project := _args[0].(string)
					datasetId := _args[1].(string)
					tableId := _args[2].(string)
					return fmt.Sprintf("bq://%v.%v.%v", project, datasetId, tableId), nil
				}).(pulumi.StringOutput),
				EntityIdColumns: pulumi.StringArray{
					pulumi.String("test_entity_column"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

data "gcp_organizations_getproject" "project" {
}

resource "gcp_vertex_aifeatureonlinestore" "featureonlinestore" {
  name = "example_feature_view"
  labels = {
    "foo" = "bar"
  }
  region = "us-central1"
  bigtable = {
    auto_scaling = {
      min_node_count         = 1
      max_node_count         = 2
      cpu_utilization_target = 80
    }
  }
}
resource "gcp_bigquery_dataset" "tf-test-dataset" {
  dataset_id    = "example_feature_view"
  friendly_name = "test"
  description   = "This is a test description"
  location      = "US"
}
resource "gcp_bigquery_table" "tf-test-table" {
  deletion_protection = false
  dataset_id          = gcp_bigquery_dataset.tf-test-dataset.dataset_id
  table_id            = "example_feature_view"
  schema              = "  [\n  {\n    \\\"name\\\": \\\"entity_id\\\",\n    \\\"mode\\\": \\\"NULLABLE\\\",\n    \\\"type\\\": \\\"STRING\\\",\n    \\\"description\\\": \\\"Test default entity_id\\\"\n  },\n    {\n    \\\"name\\\": \\\"test_entity_column\\\",\n    \\\"mode\\\": \\\"NULLABLE\\\",\n    \\\"type\\\": \\\"STRING\\\",\n    \\\"description\\\": \\\"test secondary entity column\\\"\n  },\n  {\n    \\\"name\\\": \\\"feature_timestamp\\\",\n    \\\"mode\\\": \\\"NULLABLE\\\",\n    \\\"type\\\": \\\"TIMESTAMP\\\",\n    \\\"description\\\": \\\"Default timestamp value\\\"\n  }\n]\n"
}
resource "gcp_vertex_aifeatureonlinestorefeatureview" "featureview" {
  name                 = "example_feature_view"
  region               = "us-central1"
  feature_online_store = gcp_vertex_aifeatureonlinestore.featureonlinestore.name
  sync_config = {
    cron = "0 0 * * *"
  }
  big_query_source = {
    uri               ="bq://${gcp_bigquery_table.tf-test-table.project}.${gcp_bigquery_table.tf-test-table.dataset_id}.${gcp_bigquery_table.tf-test-table.table_id}"
    entity_id_columns = ["test_entity_column"]
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vertex.AiFeatureOnlineStore;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreBigtableArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreBigtableAutoScalingArgs;
import com.pulumi.gcp.bigquery.Dataset;
import com.pulumi.gcp.bigquery.DatasetArgs;
import com.pulumi.gcp.bigquery.Table;
import com.pulumi.gcp.bigquery.TableArgs;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureview;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureviewArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var featureonlinestore = new AiFeatureOnlineStore("featureonlinestore", AiFeatureOnlineStoreArgs.builder()
            .name("example_feature_view")
            .labels(Map.of("foo", "bar"))
            .region("us-central1")
            .bigtable(AiFeatureOnlineStoreBigtableArgs.builder()
                .autoScaling(AiFeatureOnlineStoreBigtableAutoScalingArgs.builder()
                    .minNodeCount(1)
                    .maxNodeCount(2)
                    .cpuUtilizationTarget(80)
                    .build())
                .build())
            .build());

        var tf_test_dataset = new Dataset("tf-test-dataset", DatasetArgs.builder()
            .datasetId("example_feature_view")
            .friendlyName("test")
            .description("This is a test description")
            .location("US")
            .build());

        var tf_test_table = new Table("tf-test-table", TableArgs.builder()
            .deletionProtection(false)
            .datasetId(tf_test_dataset.datasetId())
            .tableId("example_feature_view")
            .schema("""
  [
  {
    \"name\": \"entity_id\",
    \"mode\": \"NULLABLE\",
    \"type\": \"STRING\",
    \"description\": \"Test default entity_id\"
  },
    {
    \"name\": \"test_entity_column\",
    \"mode\": \"NULLABLE\",
    \"type\": \"STRING\",
    \"description\": \"test secondary entity column\"
  },
  {
    \"name\": \"feature_timestamp\",
    \"mode\": \"NULLABLE\",
    \"type\": \"TIMESTAMP\",
    \"description\": \"Default timestamp value\"
  }
]
            """)
            .build());

        var featureview = new AiFeatureOnlineStoreFeatureview("featureview", AiFeatureOnlineStoreFeatureviewArgs.builder()
            .name("example_feature_view")
            .region("us-central1")
            .featureOnlineStore(featureonlinestore.name())
            .syncConfig(AiFeatureOnlineStoreFeatureviewSyncConfigArgs.builder()
                .cron("0 0 * * *")
                .build())
            .bigQuerySource(AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs.builder()
                .uri(Output.tuple(tf_test_table.project(), tf_test_table.datasetId(), tf_test_table.tableId()).applyValue(values -> {
                    var project = values.t1;
                    var datasetId = values.t2;
                    var tableId = values.t3;
                    return String.format("bq://%s.%s.%s", project,datasetId,tableId);
                }))
                .entityIdColumns("test_entity_column")
                .build())
            .build());

        final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
            .build());

    }
}
resources:
  featureonlinestore:
    type: gcp:vertex:AiFeatureOnlineStore
    properties:
      name: example_feature_view
      labels:
        foo: bar
      region: us-central1
      bigtable:
        autoScaling:
          minNodeCount: 1
          maxNodeCount: 2
          cpuUtilizationTarget: 80
  tf-test-dataset:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: example_feature_view
      friendlyName: test
      description: This is a test description
      location: US
  tf-test-table:
    type: gcp:bigquery:Table
    properties:
      deletionProtection: false
      datasetId: ${["tf-test-dataset"].datasetId}
      tableId: example_feature_view
      schema: |2
          [
          {
            \"name\": \"entity_id\",
            \"mode\": \"NULLABLE\",
            \"type\": \"STRING\",
            \"description\": \"Test default entity_id\"
          },
            {
            \"name\": \"test_entity_column\",
            \"mode\": \"NULLABLE\",
            \"type\": \"STRING\",
            \"description\": \"test secondary entity column\"
          },
          {
            \"name\": \"feature_timestamp\",
            \"mode\": \"NULLABLE\",
            \"type\": \"TIMESTAMP\",
            \"description\": \"Default timestamp value\"
          }
        ]
  featureview:
    type: gcp:vertex:AiFeatureOnlineStoreFeatureview
    properties:
      name: example_feature_view
      region: us-central1
      featureOnlineStore: ${featureonlinestore.name}
      syncConfig:
        cron: 0 0 * * *
      bigQuerySource:
        uri: bq://${["tf-test-table"].project}.${["tf-test-table"].datasetId}.${["tf-test-table"].tableId}
        entityIdColumns:
          - test_entity_column
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}

Vertex Ai Featureonlinestore Featureview Feature Registry

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", {
    name: "example_feature_view_feature_registry",
    labels: {
        foo: "bar",
    },
    region: "us-central1",
    bigtable: {
        autoScaling: {
            minNodeCount: 1,
            maxNodeCount: 2,
            cpuUtilizationTarget: 80,
        },
    },
});
const sampleDataset = new gcp.bigquery.Dataset("sample_dataset", {
    datasetId: "example_feature_view_feature_registry",
    friendlyName: "test",
    description: "This is a test description",
    location: "US",
});
const sampleTable = new gcp.bigquery.Table("sample_table", {
    deletionProtection: false,
    datasetId: sampleDataset.datasetId,
    tableId: "example_feature_view_feature_registry",
    schema: `[
    {
        \\"name\\": \\"feature_id\\",
        \\"type\\": \\"STRING\\",
        \\"mode\\": \\"NULLABLE\\"
    },
    {
        \\"name\\": \\"example_feature_view_feature_registry\\",
        \\"type\\": \\"STRING\\",
        \\"mode\\": \\"NULLABLE\\"
    },
    {
        \\"name\\": \\"feature_timestamp\\",
        \\"type\\": \\"TIMESTAMP\\",
        \\"mode\\": \\"NULLABLE\\"
    }
]
`,
});
const sampleFeatureGroup = new gcp.vertex.AiFeatureGroup("sample_feature_group", {
    name: "example_feature_view_feature_registry",
    description: "A sample feature group",
    region: "us-central1",
    labels: {
        "label-one": "value-one",
    },
    bigQuery: {
        bigQuerySource: {
            inputUri: pulumi.interpolate`bq://${sampleTable.project}.${sampleTable.datasetId}.${sampleTable.tableId}`,
        },
        entityIdColumns: ["feature_id"],
    },
});
const sampleFeature = new gcp.vertex.AiFeatureGroupFeature("sample_feature", {
    name: "example_feature_view_feature_registry",
    region: "us-central1",
    featureGroup: sampleFeatureGroup.name,
    description: "A sample feature",
    labels: {
        "label-one": "value-one",
    },
});
const featureviewFeatureregistry = new gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview_featureregistry", {
    name: "example_feature_view_feature_registry",
    region: "us-central1",
    featureOnlineStore: featureonlinestore.name,
    syncConfig: {
        cron: "0 0 * * *",
    },
    featureRegistrySource: {
        featureGroups: [{
            featureGroupId: sampleFeatureGroup.name,
            featureIds: [sampleFeature.name],
        }],
    },
});
import pulumi
import pulumi_gcp as gcp

featureonlinestore = gcp.vertex.AiFeatureOnlineStore("featureonlinestore",
    name="example_feature_view_feature_registry",
    labels={
        "foo": "bar",
    },
    region="us-central1",
    bigtable={
        "auto_scaling": {
            "min_node_count": 1,
            "max_node_count": 2,
            "cpu_utilization_target": 80,
        },
    })
sample_dataset = gcp.bigquery.Dataset("sample_dataset",
    dataset_id="example_feature_view_feature_registry",
    friendly_name="test",
    description="This is a test description",
    location="US")
sample_table = gcp.bigquery.Table("sample_table",
    deletion_protection=False,
    dataset_id=sample_dataset.dataset_id,
    table_id="example_feature_view_feature_registry",
    schema="""[
    {
        \"name\": \"feature_id\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"example_feature_view_feature_registry\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"feature_timestamp\",
        \"type\": \"TIMESTAMP\",
        \"mode\": \"NULLABLE\"
    }
]
""")
sample_feature_group = gcp.vertex.AiFeatureGroup("sample_feature_group",
    name="example_feature_view_feature_registry",
    description="A sample feature group",
    region="us-central1",
    labels={
        "label-one": "value-one",
    },
    big_query={
        "big_query_source": {
            "input_uri": pulumi.Output.all(
                project=sample_table.project,
                dataset_id=sample_table.dataset_id,
                table_id=sample_table.table_id
).apply(lambda resolved_outputs: f"bq://{resolved_outputs['project']}.{resolved_outputs['dataset_id']}.{resolved_outputs['table_id']}")
,
        },
        "entity_id_columns": ["feature_id"],
    })
sample_feature = gcp.vertex.AiFeatureGroupFeature("sample_feature",
    name="example_feature_view_feature_registry",
    region="us-central1",
    feature_group=sample_feature_group.name,
    description="A sample feature",
    labels={
        "label-one": "value-one",
    })
featureview_featureregistry = gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview_featureregistry",
    name="example_feature_view_feature_registry",
    region="us-central1",
    feature_online_store=featureonlinestore.name,
    sync_config={
        "cron": "0 0 * * *",
    },
    feature_registry_source={
        "feature_groups": [{
            "feature_group_id": sample_feature_group.name,
            "feature_ids": [sample_feature.name],
        }],
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var featureonlinestore = new Gcp.Vertex.AiFeatureOnlineStore("featureonlinestore", new()
    {
        Name = "example_feature_view_feature_registry",
        Labels =
        {
            { "foo", "bar" },
        },
        Region = "us-central1",
        Bigtable = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreBigtableArgs
        {
            AutoScaling = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreBigtableAutoScalingArgs
            {
                MinNodeCount = 1,
                MaxNodeCount = 2,
                CpuUtilizationTarget = 80,
            },
        },
    });

    var sampleDataset = new Gcp.BigQuery.Dataset("sample_dataset", new()
    {
        DatasetId = "example_feature_view_feature_registry",
        FriendlyName = "test",
        Description = "This is a test description",
        Location = "US",
    });

    var sampleTable = new Gcp.BigQuery.Table("sample_table", new()
    {
        DeletionProtection = false,
        DatasetId = sampleDataset.DatasetId,
        TableId = "example_feature_view_feature_registry",
        Schema = @"[
    {
        \""name\"": \""feature_id\"",
        \""type\"": \""STRING\"",
        \""mode\"": \""NULLABLE\""
    },
    {
        \""name\"": \""example_feature_view_feature_registry\"",
        \""type\"": \""STRING\"",
        \""mode\"": \""NULLABLE\""
    },
    {
        \""name\"": \""feature_timestamp\"",
        \""type\"": \""TIMESTAMP\"",
        \""mode\"": \""NULLABLE\""
    }
]
",
    });

    var sampleFeatureGroup = new Gcp.Vertex.AiFeatureGroup("sample_feature_group", new()
    {
        Name = "example_feature_view_feature_registry",
        Description = "A sample feature group",
        Region = "us-central1",
        Labels =
        {
            { "label-one", "value-one" },
        },
        BigQuery = new Gcp.Vertex.Inputs.AiFeatureGroupBigQueryArgs
        {
            BigQuerySource = new Gcp.Vertex.Inputs.AiFeatureGroupBigQueryBigQuerySourceArgs
            {
                InputUri = Output.Tuple(sampleTable.Project, sampleTable.DatasetId, sampleTable.TableId).Apply(values =>
                {
                    var project = values.Item1;
                    var datasetId = values.Item2;
                    var tableId = values.Item3;
                    return $"bq://{project}.{datasetId}.{tableId}";
                }),
            },
            EntityIdColumns = new[]
            {
                "feature_id",
            },
        },
    });

    var sampleFeature = new Gcp.Vertex.AiFeatureGroupFeature("sample_feature", new()
    {
        Name = "example_feature_view_feature_registry",
        Region = "us-central1",
        FeatureGroup = sampleFeatureGroup.Name,
        Description = "A sample feature",
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

    var featureviewFeatureregistry = new Gcp.Vertex.AiFeatureOnlineStoreFeatureview("featureview_featureregistry", new()
    {
        Name = "example_feature_view_feature_registry",
        Region = "us-central1",
        FeatureOnlineStore = featureonlinestore.Name,
        SyncConfig = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs
        {
            Cron = "0 0 * * *",
        },
        FeatureRegistrySource = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs
        {
            FeatureGroups = new[]
            {
                new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs
                {
                    FeatureGroupId = sampleFeatureGroup.Name,
                    FeatureIds = new[]
                    {
                        sampleFeature.Name,
                    },
                },
            },
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vertex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		featureonlinestore, err := vertex.NewAiFeatureOnlineStore(ctx, "featureonlinestore", &vertex.AiFeatureOnlineStoreArgs{
			Name: pulumi.String("example_feature_view_feature_registry"),
			Labels: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			Region: pulumi.String("us-central1"),
			Bigtable: &vertex.AiFeatureOnlineStoreBigtableArgs{
				AutoScaling: &vertex.AiFeatureOnlineStoreBigtableAutoScalingArgs{
					MinNodeCount:         pulumi.Int(1),
					MaxNodeCount:         pulumi.Int(2),
					CpuUtilizationTarget: pulumi.Int(80),
				},
			},
		})
		if err != nil {
			return err
		}
		sampleDataset, err := bigquery.NewDataset(ctx, "sample_dataset", &bigquery.DatasetArgs{
			DatasetId:    pulumi.String("example_feature_view_feature_registry"),
			FriendlyName: pulumi.String("test"),
			Description:  pulumi.String("This is a test description"),
			Location:     pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		sampleTable, err := bigquery.NewTable(ctx, "sample_table", &bigquery.TableArgs{
			DeletionProtection: pulumi.Bool(false),
			DatasetId:          sampleDataset.DatasetId,
			TableId:            pulumi.String("example_feature_view_feature_registry"),
			Schema: pulumi.String(`[
    {
        \"name\": \"feature_id\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"example_feature_view_feature_registry\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"feature_timestamp\",
        \"type\": \"TIMESTAMP\",
        \"mode\": \"NULLABLE\"
    }
]
`),
		})
		if err != nil {
			return err
		}
		sampleFeatureGroup, err := vertex.NewAiFeatureGroup(ctx, "sample_feature_group", &vertex.AiFeatureGroupArgs{
			Name:        pulumi.String("example_feature_view_feature_registry"),
			Description: pulumi.String("A sample feature group"),
			Region:      pulumi.String("us-central1"),
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
			BigQuery: &vertex.AiFeatureGroupBigQueryArgs{
				BigQuerySource: &vertex.AiFeatureGroupBigQueryBigQuerySourceArgs{
					InputUri: pulumi.All(sampleTable.Project, sampleTable.DatasetId, sampleTable.TableId).ApplyT(func(_args []interface{}) (string, error) {
						project := _args[0].(string)
						datasetId := _args[1].(string)
						tableId := _args[2].(string)
						return fmt.Sprintf("bq://%v.%v.%v", project, datasetId, tableId), nil
					}).(pulumi.StringOutput),
				},
				EntityIdColumns: pulumi.StringArray{
					pulumi.String("feature_id"),
				},
			},
		})
		if err != nil {
			return err
		}
		sampleFeature, err := vertex.NewAiFeatureGroupFeature(ctx, "sample_feature", &vertex.AiFeatureGroupFeatureArgs{
			Name:         pulumi.String("example_feature_view_feature_registry"),
			Region:       pulumi.String("us-central1"),
			FeatureGroup: sampleFeatureGroup.Name,
			Description:  pulumi.String("A sample feature"),
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		_, err = vertex.NewAiFeatureOnlineStoreFeatureview(ctx, "featureview_featureregistry", &vertex.AiFeatureOnlineStoreFeatureviewArgs{
			Name:               pulumi.String("example_feature_view_feature_registry"),
			Region:             pulumi.String("us-central1"),
			FeatureOnlineStore: featureonlinestore.Name,
			SyncConfig: &vertex.AiFeatureOnlineStoreFeatureviewSyncConfigArgs{
				Cron: pulumi.String("0 0 * * *"),
			},
			FeatureRegistrySource: &vertex.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs{
				FeatureGroups: vertex.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArray{
					&vertex.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs{
						FeatureGroupId: sampleFeatureGroup.Name,
						FeatureIds: pulumi.StringArray{
							sampleFeature.Name,
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_vertex_aifeatureonlinestore" "featureonlinestore" {
  name = "example_feature_view_feature_registry"
  labels = {
    "foo" = "bar"
  }
  region = "us-central1"
  bigtable = {
    auto_scaling = {
      min_node_count         = 1
      max_node_count         = 2
      cpu_utilization_target = 80
    }
  }
}
resource "gcp_bigquery_dataset" "sample_dataset" {
  dataset_id    = "example_feature_view_feature_registry"
  friendly_name = "test"
  description   = "This is a test description"
  location      = "US"
}
resource "gcp_bigquery_table" "sample_table" {
  deletion_protection = false
  dataset_id          = gcp_bigquery_dataset.sample_dataset.dataset_id
  table_id            = "example_feature_view_feature_registry"
  schema              = "[\n    {\n        \\\"name\\\": \\\"feature_id\\\",\n        \\\"type\\\": \\\"STRING\\\",\n        \\\"mode\\\": \\\"NULLABLE\\\"\n    },\n    {\n        \\\"name\\\": \\\"example_feature_view_feature_registry\\\",\n        \\\"type\\\": \\\"STRING\\\",\n        \\\"mode\\\": \\\"NULLABLE\\\"\n    },\n    {\n        \\\"name\\\": \\\"feature_timestamp\\\",\n        \\\"type\\\": \\\"TIMESTAMP\\\",\n        \\\"mode\\\": \\\"NULLABLE\\\"\n    }\n]\n"
}
resource "gcp_vertex_aifeaturegroup" "sample_feature_group" {
  name        = "example_feature_view_feature_registry"
  description = "A sample feature group"
  region      = "us-central1"
  labels = {
    "label-one" = "value-one"
  }
  big_query = {
    big_query_source = {
      input_uri ="bq://${gcp_bigquery_table.sample_table.project}.${gcp_bigquery_table.sample_table.dataset_id}.${gcp_bigquery_table.sample_table.table_id}"
    }
    entity_id_columns = ["feature_id"]
  }
}
resource "gcp_vertex_aifeaturegroupfeature" "sample_feature" {
  name          = "example_feature_view_feature_registry"
  region        = "us-central1"
  feature_group = gcp_vertex_aifeaturegroup.sample_feature_group.name
  description   = "A sample feature"
  labels = {
    "label-one" = "value-one"
  }
}
resource "gcp_vertex_aifeatureonlinestorefeatureview" "featureview_featureregistry" {
  name                 = "example_feature_view_feature_registry"
  region               = "us-central1"
  feature_online_store = gcp_vertex_aifeatureonlinestore.featureonlinestore.name
  sync_config = {
    cron = "0 0 * * *"
  }
  feature_registry_source = {
    feature_groups = [{
      "featureGroupId" = gcp_vertex_aifeaturegroup.sample_feature_group.name
      "featureIds"     = [gcp_vertex_aifeaturegroupfeature.sample_feature.name]
    }]
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vertex.AiFeatureOnlineStore;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreBigtableArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreBigtableAutoScalingArgs;
import com.pulumi.gcp.bigquery.Dataset;
import com.pulumi.gcp.bigquery.DatasetArgs;
import com.pulumi.gcp.bigquery.Table;
import com.pulumi.gcp.bigquery.TableArgs;
import com.pulumi.gcp.vertex.AiFeatureGroup;
import com.pulumi.gcp.vertex.AiFeatureGroupArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureGroupBigQueryArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureGroupBigQueryBigQuerySourceArgs;
import com.pulumi.gcp.vertex.AiFeatureGroupFeature;
import com.pulumi.gcp.vertex.AiFeatureGroupFeatureArgs;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureview;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureviewArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var featureonlinestore = new AiFeatureOnlineStore("featureonlinestore", AiFeatureOnlineStoreArgs.builder()
            .name("example_feature_view_feature_registry")
            .labels(Map.of("foo", "bar"))
            .region("us-central1")
            .bigtable(AiFeatureOnlineStoreBigtableArgs.builder()
                .autoScaling(AiFeatureOnlineStoreBigtableAutoScalingArgs.builder()
                    .minNodeCount(1)
                    .maxNodeCount(2)
                    .cpuUtilizationTarget(80)
                    .build())
                .build())
            .build());

        var sampleDataset = new Dataset("sampleDataset", DatasetArgs.builder()
            .datasetId("example_feature_view_feature_registry")
            .friendlyName("test")
            .description("This is a test description")
            .location("US")
            .build());

        var sampleTable = new Table("sampleTable", TableArgs.builder()
            .deletionProtection(false)
            .datasetId(sampleDataset.datasetId())
            .tableId("example_feature_view_feature_registry")
            .schema("""
[
    {
        \"name\": \"feature_id\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"example_feature_view_feature_registry\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"feature_timestamp\",
        \"type\": \"TIMESTAMP\",
        \"mode\": \"NULLABLE\"
    }
]
            """)
            .build());

        var sampleFeatureGroup = new AiFeatureGroup("sampleFeatureGroup", AiFeatureGroupArgs.builder()
            .name("example_feature_view_feature_registry")
            .description("A sample feature group")
            .region("us-central1")
            .labels(Map.of("label-one", "value-one"))
            .bigQuery(AiFeatureGroupBigQueryArgs.builder()
                .bigQuerySource(AiFeatureGroupBigQueryBigQuerySourceArgs.builder()
                    .inputUri(Output.tuple(sampleTable.project(), sampleTable.datasetId(), sampleTable.tableId()).applyValue(values -> {
                        var project = values.t1;
                        var datasetId = values.t2;
                        var tableId = values.t3;
                        return String.format("bq://%s.%s.%s", project,datasetId,tableId);
                    }))
                    .build())
                .entityIdColumns("feature_id")
                .build())
            .build());

        var sampleFeature = new AiFeatureGroupFeature("sampleFeature", AiFeatureGroupFeatureArgs.builder()
            .name("example_feature_view_feature_registry")
            .region("us-central1")
            .featureGroup(sampleFeatureGroup.name())
            .description("A sample feature")
            .labels(Map.of("label-one", "value-one"))
            .build());

        var featureviewFeatureregistry = new AiFeatureOnlineStoreFeatureview("featureviewFeatureregistry", AiFeatureOnlineStoreFeatureviewArgs.builder()
            .name("example_feature_view_feature_registry")
            .region("us-central1")
            .featureOnlineStore(featureonlinestore.name())
            .syncConfig(AiFeatureOnlineStoreFeatureviewSyncConfigArgs.builder()
                .cron("0 0 * * *")
                .build())
            .featureRegistrySource(AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs.builder()
                .featureGroups(AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs.builder()
                    .featureGroupId(sampleFeatureGroup.name())
                    .featureIds(sampleFeature.name())
                    .build())
                .build())
            .build());

    }
}
resources:
  featureonlinestore:
    type: gcp:vertex:AiFeatureOnlineStore
    properties:
      name: example_feature_view_feature_registry
      labels:
        foo: bar
      region: us-central1
      bigtable:
        autoScaling:
          minNodeCount: 1
          maxNodeCount: 2
          cpuUtilizationTarget: 80
  sampleDataset:
    type: gcp:bigquery:Dataset
    name: sample_dataset
    properties:
      datasetId: example_feature_view_feature_registry
      friendlyName: test
      description: This is a test description
      location: US
  sampleTable:
    type: gcp:bigquery:Table
    name: sample_table
    properties:
      deletionProtection: false
      datasetId: ${sampleDataset.datasetId}
      tableId: example_feature_view_feature_registry
      schema: |
        [
            {
                \"name\": \"feature_id\",
                \"type\": \"STRING\",
                \"mode\": \"NULLABLE\"
            },
            {
                \"name\": \"example_feature_view_feature_registry\",
                \"type\": \"STRING\",
                \"mode\": \"NULLABLE\"
            },
            {
                \"name\": \"feature_timestamp\",
                \"type\": \"TIMESTAMP\",
                \"mode\": \"NULLABLE\"
            }
        ]
  sampleFeatureGroup:
    type: gcp:vertex:AiFeatureGroup
    name: sample_feature_group
    properties:
      name: example_feature_view_feature_registry
      description: A sample feature group
      region: us-central1
      labels:
        label-one: value-one
      bigQuery:
        bigQuerySource:
          inputUri: bq://${sampleTable.project}.${sampleTable.datasetId}.${sampleTable.tableId}
        entityIdColumns:
          - feature_id
  sampleFeature:
    type: gcp:vertex:AiFeatureGroupFeature
    name: sample_feature
    properties:
      name: example_feature_view_feature_registry
      region: us-central1
      featureGroup: ${sampleFeatureGroup.name}
      description: A sample feature
      labels:
        label-one: value-one
  featureviewFeatureregistry:
    type: gcp:vertex:AiFeatureOnlineStoreFeatureview
    name: featureview_featureregistry
    properties:
      name: example_feature_view_feature_registry
      region: us-central1
      featureOnlineStore: ${featureonlinestore.name}
      syncConfig:
        cron: 0 0 * * *
      featureRegistrySource:
        featureGroups:
          - featureGroupId: ${sampleFeatureGroup.name}
            featureIds:
              - ${sampleFeature.name}

Vertex Ai Featureonlinestore Featureview Cross Project

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as time from "@pulumiverse/time";

const testProject = gcp.organizations.getProject({});
const project = new gcp.organizations.Project("project", {
    projectId: "tf-test_79241",
    name: "tf-test_57926",
    orgId: "123456789",
    billingAccount: "000000-0000000-0000000-000000",
    deletionPolicy: "DELETE",
});
const wait60Seconds = new time.Sleep("wait_60_seconds", {createDuration: "60s"}, {
    dependsOn: [project],
});
const vertexai = new gcp.projects.Service("vertexai", {
    service: "aiplatform.googleapis.com",
    project: project.projectId,
}, {
    dependsOn: [wait60Seconds],
});
const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", {
    name: "example_cross_project_featureview",
    project: project.projectId,
    labels: {
        foo: "bar",
    },
    region: "us-central1",
    bigtable: {
        autoScaling: {
            minNodeCount: 1,
            maxNodeCount: 2,
            cpuUtilizationTarget: 80,
        },
    },
}, {
    dependsOn: [vertexai],
});
const sampleDataset = new gcp.bigquery.Dataset("sample_dataset", {
    datasetId: "example_cross_project_featureview",
    friendlyName: "test",
    description: "This is a test description",
    location: "US",
});
const viewer = new gcp.bigquery.DatasetIamMember("viewer", {
    project: testProject.then(testProject => testProject.projectId),
    datasetId: sampleDataset.datasetId,
    role: "roles/bigquery.dataViewer",
    member: pulumi.interpolate`serviceAccount:service-${project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com`,
}, {
    dependsOn: [featureonlinestore],
});
const wait30Seconds = new time.Sleep("wait_30_seconds", {createDuration: "30s"}, {
    dependsOn: [viewer],
});
const sampleTable = new gcp.bigquery.Table("sample_table", {
    deletionProtection: false,
    datasetId: sampleDataset.datasetId,
    tableId: "example_cross_project_featureview",
    schema: `[
    {
        \\"name\\": \\"feature_id\\",
        \\"type\\": \\"STRING\\",
        \\"mode\\": \\"NULLABLE\\"
    },
    {
        \\"name\\": \\"example_cross_project_featureview\\",
        \\"type\\": \\"STRING\\",
        \\"mode\\": \\"NULLABLE\\"
    },
    {
        \\"name\\": \\"feature_timestamp\\",
        \\"type\\": \\"TIMESTAMP\\",
        \\"mode\\": \\"NULLABLE\\"
    }
]
`,
});
const sampleFeatureGroup = new gcp.vertex.AiFeatureGroup("sample_feature_group", {
    name: "example_cross_project_featureview",
    description: "A sample feature group",
    region: "us-central1",
    labels: {
        "label-one": "value-one",
    },
    bigQuery: {
        bigQuerySource: {
            inputUri: pulumi.interpolate`bq://${sampleTable.project}.${sampleTable.datasetId}.${sampleTable.tableId}`,
        },
        entityIdColumns: ["feature_id"],
    },
});
const sampleFeature = new gcp.vertex.AiFeatureGroupFeature("sample_feature", {
    name: "example_cross_project_featureview",
    region: "us-central1",
    featureGroup: sampleFeatureGroup.name,
    description: "A sample feature",
    labels: {
        "label-one": "value-one",
    },
});
const crossProjectFeatureview = new gcp.vertex.AiFeatureOnlineStoreFeatureview("cross_project_featureview", {
    name: "example_cross_project_featureview",
    project: project.projectId,
    region: "us-central1",
    featureOnlineStore: featureonlinestore.name,
    syncConfig: {
        continuous: true,
    },
    featureRegistrySource: {
        featureGroups: [{
            featureGroupId: sampleFeatureGroup.name,
            featureIds: [sampleFeature.name],
        }],
        projectNumber: testProject.then(testProject => testProject.number),
    },
}, {
    dependsOn: [
        vertexai,
        wait30Seconds,
    ],
});
import pulumi
import pulumi_gcp as gcp
import pulumiverse_time as time

test_project = gcp.organizations.get_project()
project = gcp.organizations.Project("project",
    project_id="tf-test_79241",
    name="tf-test_57926",
    org_id="123456789",
    billing_account="000000-0000000-0000000-000000",
    deletion_policy="DELETE")
wait60_seconds = time.Sleep("wait_60_seconds", create_duration="60s",
opts = pulumi.ResourceOptions(depends_on=[project]))
vertexai = gcp.projects.Service("vertexai",
    service="aiplatform.googleapis.com",
    project=project.project_id,
    opts = pulumi.ResourceOptions(depends_on=[wait60_seconds]))
featureonlinestore = gcp.vertex.AiFeatureOnlineStore("featureonlinestore",
    name="example_cross_project_featureview",
    project=project.project_id,
    labels={
        "foo": "bar",
    },
    region="us-central1",
    bigtable={
        "auto_scaling": {
            "min_node_count": 1,
            "max_node_count": 2,
            "cpu_utilization_target": 80,
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[vertexai]))
sample_dataset = gcp.bigquery.Dataset("sample_dataset",
    dataset_id="example_cross_project_featureview",
    friendly_name="test",
    description="This is a test description",
    location="US")
viewer = gcp.bigquery.DatasetIamMember("viewer",
    project=test_project.project_id,
    dataset_id=sample_dataset.dataset_id,
    role="roles/bigquery.dataViewer",
    member=project.number.apply(lambda number: f"serviceAccount:service-{number}@gcp-sa-aiplatform.iam.gserviceaccount.com"),
    opts = pulumi.ResourceOptions(depends_on=[featureonlinestore]))
wait30_seconds = time.Sleep("wait_30_seconds", create_duration="30s",
opts = pulumi.ResourceOptions(depends_on=[viewer]))
sample_table = gcp.bigquery.Table("sample_table",
    deletion_protection=False,
    dataset_id=sample_dataset.dataset_id,
    table_id="example_cross_project_featureview",
    schema="""[
    {
        \"name\": \"feature_id\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"example_cross_project_featureview\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"feature_timestamp\",
        \"type\": \"TIMESTAMP\",
        \"mode\": \"NULLABLE\"
    }
]
""")
sample_feature_group = gcp.vertex.AiFeatureGroup("sample_feature_group",
    name="example_cross_project_featureview",
    description="A sample feature group",
    region="us-central1",
    labels={
        "label-one": "value-one",
    },
    big_query={
        "big_query_source": {
            "input_uri": pulumi.Output.all(
                project=sample_table.project,
                dataset_id=sample_table.dataset_id,
                table_id=sample_table.table_id
).apply(lambda resolved_outputs: f"bq://{resolved_outputs['project']}.{resolved_outputs['dataset_id']}.{resolved_outputs['table_id']}")
,
        },
        "entity_id_columns": ["feature_id"],
    })
sample_feature = gcp.vertex.AiFeatureGroupFeature("sample_feature",
    name="example_cross_project_featureview",
    region="us-central1",
    feature_group=sample_feature_group.name,
    description="A sample feature",
    labels={
        "label-one": "value-one",
    })
cross_project_featureview = gcp.vertex.AiFeatureOnlineStoreFeatureview("cross_project_featureview",
    name="example_cross_project_featureview",
    project=project.project_id,
    region="us-central1",
    feature_online_store=featureonlinestore.name,
    sync_config={
        "continuous": True,
    },
    feature_registry_source={
        "feature_groups": [{
            "feature_group_id": sample_feature_group.name,
            "feature_ids": [sample_feature.name],
        }],
        "project_number": test_project.number,
    },
    opts = pulumi.ResourceOptions(depends_on=[
            vertexai,
            wait30_seconds,
        ]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Time = Pulumiverse.Time;

return await Deployment.RunAsync(() =>
{
    var testProject = Gcp.Organizations.GetProject.Invoke();

    var project = new Gcp.Organizations.Project("project", new()
    {
        ProjectId = "tf-test_79241",
        Name = "tf-test_57926",
        OrgId = "123456789",
        BillingAccount = "000000-0000000-0000000-000000",
        DeletionPolicy = "DELETE",
    });

    var wait60Seconds = new Time.Sleep("wait_60_seconds", new()
    {
        CreateDuration = "60s",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            project,
        },
    });

    var vertexai = new Gcp.Projects.Service("vertexai", new()
    {
        ServiceName = "aiplatform.googleapis.com",
        Project = project.ProjectId,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            wait60Seconds,
        },
    });

    var featureonlinestore = new Gcp.Vertex.AiFeatureOnlineStore("featureonlinestore", new()
    {
        Name = "example_cross_project_featureview",
        Project = project.ProjectId,
        Labels =
        {
            { "foo", "bar" },
        },
        Region = "us-central1",
        Bigtable = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreBigtableArgs
        {
            AutoScaling = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreBigtableAutoScalingArgs
            {
                MinNodeCount = 1,
                MaxNodeCount = 2,
                CpuUtilizationTarget = 80,
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            vertexai,
        },
    });

    var sampleDataset = new Gcp.BigQuery.Dataset("sample_dataset", new()
    {
        DatasetId = "example_cross_project_featureview",
        FriendlyName = "test",
        Description = "This is a test description",
        Location = "US",
    });

    var viewer = new Gcp.BigQuery.DatasetIamMember("viewer", new()
    {
        Project = testProject.Apply(getProjectResult => getProjectResult.ProjectId),
        DatasetId = sampleDataset.DatasetId,
        Role = "roles/bigquery.dataViewer",
        Member = project.Number.Apply(number => $"serviceAccount:service-{number}@gcp-sa-aiplatform.iam.gserviceaccount.com"),
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            featureonlinestore,
        },
    });

    var wait30Seconds = new Time.Sleep("wait_30_seconds", new()
    {
        CreateDuration = "30s",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            viewer,
        },
    });

    var sampleTable = new Gcp.BigQuery.Table("sample_table", new()
    {
        DeletionProtection = false,
        DatasetId = sampleDataset.DatasetId,
        TableId = "example_cross_project_featureview",
        Schema = @"[
    {
        \""name\"": \""feature_id\"",
        \""type\"": \""STRING\"",
        \""mode\"": \""NULLABLE\""
    },
    {
        \""name\"": \""example_cross_project_featureview\"",
        \""type\"": \""STRING\"",
        \""mode\"": \""NULLABLE\""
    },
    {
        \""name\"": \""feature_timestamp\"",
        \""type\"": \""TIMESTAMP\"",
        \""mode\"": \""NULLABLE\""
    }
]
",
    });

    var sampleFeatureGroup = new Gcp.Vertex.AiFeatureGroup("sample_feature_group", new()
    {
        Name = "example_cross_project_featureview",
        Description = "A sample feature group",
        Region = "us-central1",
        Labels =
        {
            { "label-one", "value-one" },
        },
        BigQuery = new Gcp.Vertex.Inputs.AiFeatureGroupBigQueryArgs
        {
            BigQuerySource = new Gcp.Vertex.Inputs.AiFeatureGroupBigQueryBigQuerySourceArgs
            {
                InputUri = Output.Tuple(sampleTable.Project, sampleTable.DatasetId, sampleTable.TableId).Apply(values =>
                {
                    var project = values.Item1;
                    var datasetId = values.Item2;
                    var tableId = values.Item3;
                    return $"bq://{project}.{datasetId}.{tableId}";
                }),
            },
            EntityIdColumns = new[]
            {
                "feature_id",
            },
        },
    });

    var sampleFeature = new Gcp.Vertex.AiFeatureGroupFeature("sample_feature", new()
    {
        Name = "example_cross_project_featureview",
        Region = "us-central1",
        FeatureGroup = sampleFeatureGroup.Name,
        Description = "A sample feature",
        Labels =
        {
            { "label-one", "value-one" },
        },
    });

    var crossProjectFeatureview = new Gcp.Vertex.AiFeatureOnlineStoreFeatureview("cross_project_featureview", new()
    {
        Name = "example_cross_project_featureview",
        Project = project.ProjectId,
        Region = "us-central1",
        FeatureOnlineStore = featureonlinestore.Name,
        SyncConfig = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs
        {
            Continuous = true,
        },
        FeatureRegistrySource = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs
        {
            FeatureGroups = new[]
            {
                new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs
                {
                    FeatureGroupId = sampleFeatureGroup.Name,
                    FeatureIds = new[]
                    {
                        sampleFeature.Name,
                    },
                },
            },
            ProjectNumber = testProject.Apply(getProjectResult => getProjectResult.Number),
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            vertexai,
            wait30Seconds,
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/projects"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vertex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-time/sdk/go/time"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testProject, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
			ProjectId:      pulumi.String("tf-test_79241"),
			Name:           pulumi.String("tf-test_57926"),
			OrgId:          pulumi.String("123456789"),
			BillingAccount: pulumi.String("000000-0000000-0000000-000000"),
			DeletionPolicy: pulumi.String("DELETE"),
		})
		if err != nil {
			return err
		}
		wait60Seconds, err := time.NewSleep(ctx, "wait_60_seconds", &time.SleepArgs{
			CreateDuration: pulumi.String("60s"),
		}, pulumi.DependsOn([]pulumi.Resource{
			project,
		}))
		if err != nil {
			return err
		}
		vertexai, err := projects.NewService(ctx, "vertexai", &projects.ServiceArgs{
			Service: pulumi.String("aiplatform.googleapis.com"),
			Project: project.ProjectId,
		}, pulumi.DependsOn([]pulumi.Resource{
			wait60Seconds,
		}))
		if err != nil {
			return err
		}
		featureonlinestore, err := vertex.NewAiFeatureOnlineStore(ctx, "featureonlinestore", &vertex.AiFeatureOnlineStoreArgs{
			Name:    pulumi.String("example_cross_project_featureview"),
			Project: project.ProjectId,
			Labels: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			Region: pulumi.String("us-central1"),
			Bigtable: &vertex.AiFeatureOnlineStoreBigtableArgs{
				AutoScaling: &vertex.AiFeatureOnlineStoreBigtableAutoScalingArgs{
					MinNodeCount:         pulumi.Int(1),
					MaxNodeCount:         pulumi.Int(2),
					CpuUtilizationTarget: pulumi.Int(80),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			vertexai,
		}))
		if err != nil {
			return err
		}
		sampleDataset, err := bigquery.NewDataset(ctx, "sample_dataset", &bigquery.DatasetArgs{
			DatasetId:    pulumi.String("example_cross_project_featureview"),
			FriendlyName: pulumi.String("test"),
			Description:  pulumi.String("This is a test description"),
			Location:     pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		viewer, err := bigquery.NewDatasetIamMember(ctx, "viewer", &bigquery.DatasetIamMemberArgs{
			Project:   pulumi.String(testProject.ProjectId),
			DatasetId: sampleDataset.DatasetId,
			Role:      pulumi.String("roles/bigquery.dataViewer"),
			Member: project.Number.ApplyT(func(number string) (string, error) {
				return fmt.Sprintf("serviceAccount:service-%v@gcp-sa-aiplatform.iam.gserviceaccount.com", number), nil
			}).(pulumi.StringOutput),
		}, pulumi.DependsOn([]pulumi.Resource{
			featureonlinestore,
		}))
		if err != nil {
			return err
		}
		wait30Seconds, err := time.NewSleep(ctx, "wait_30_seconds", &time.SleepArgs{
			CreateDuration: pulumi.String("30s"),
		}, pulumi.DependsOn([]pulumi.Resource{
			viewer,
		}))
		if err != nil {
			return err
		}
		sampleTable, err := bigquery.NewTable(ctx, "sample_table", &bigquery.TableArgs{
			DeletionProtection: pulumi.Bool(false),
			DatasetId:          sampleDataset.DatasetId,
			TableId:            pulumi.String("example_cross_project_featureview"),
			Schema: pulumi.String(`[
    {
        \"name\": \"feature_id\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"example_cross_project_featureview\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"feature_timestamp\",
        \"type\": \"TIMESTAMP\",
        \"mode\": \"NULLABLE\"
    }
]
`),
		})
		if err != nil {
			return err
		}
		sampleFeatureGroup, err := vertex.NewAiFeatureGroup(ctx, "sample_feature_group", &vertex.AiFeatureGroupArgs{
			Name:        pulumi.String("example_cross_project_featureview"),
			Description: pulumi.String("A sample feature group"),
			Region:      pulumi.String("us-central1"),
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
			BigQuery: &vertex.AiFeatureGroupBigQueryArgs{
				BigQuerySource: &vertex.AiFeatureGroupBigQueryBigQuerySourceArgs{
					InputUri: pulumi.All(sampleTable.Project, sampleTable.DatasetId, sampleTable.TableId).ApplyT(func(_args []interface{}) (string, error) {
						project := _args[0].(string)
						datasetId := _args[1].(string)
						tableId := _args[2].(string)
						return fmt.Sprintf("bq://%v.%v.%v", project, datasetId, tableId), nil
					}).(pulumi.StringOutput),
				},
				EntityIdColumns: pulumi.StringArray{
					pulumi.String("feature_id"),
				},
			},
		})
		if err != nil {
			return err
		}
		sampleFeature, err := vertex.NewAiFeatureGroupFeature(ctx, "sample_feature", &vertex.AiFeatureGroupFeatureArgs{
			Name:         pulumi.String("example_cross_project_featureview"),
			Region:       pulumi.String("us-central1"),
			FeatureGroup: sampleFeatureGroup.Name,
			Description:  pulumi.String("A sample feature"),
			Labels: pulumi.StringMap{
				"label-one": pulumi.String("value-one"),
			},
		})
		if err != nil {
			return err
		}
		_, err = vertex.NewAiFeatureOnlineStoreFeatureview(ctx, "cross_project_featureview", &vertex.AiFeatureOnlineStoreFeatureviewArgs{
			Name:               pulumi.String("example_cross_project_featureview"),
			Project:            project.ProjectId,
			Region:             pulumi.String("us-central1"),
			FeatureOnlineStore: featureonlinestore.Name,
			SyncConfig: &vertex.AiFeatureOnlineStoreFeatureviewSyncConfigArgs{
				Continuous: pulumi.Bool(true),
			},
			FeatureRegistrySource: &vertex.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs{
				FeatureGroups: vertex.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArray{
					&vertex.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs{
						FeatureGroupId: sampleFeatureGroup.Name,
						FeatureIds: pulumi.StringArray{
							sampleFeature.Name,
						},
					},
				},
				ProjectNumber: pulumi.String(testProject.Number),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			vertexai,
			wait30Seconds,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
    time = {
      source = "pulumi/time"
    }
  }
}

data "gcp_organizations_getproject" "testProject" {
}

resource "gcp_organizations_project" "project" {
  project_id      = "tf-test_79241"
  name            = "tf-test_57926"
  org_id          = "123456789"
  billing_account = "000000-0000000-0000000-000000"
  deletion_policy = "DELETE"
}
resource "time_sleep" "wait_60_seconds" {
  depends_on      = [gcp_organizations_project.project]
  create_duration = "60s"
}
resource "time_sleep" "wait_30_seconds" {
  depends_on      = [gcp_bigquery_datasetiammember.viewer]
  create_duration = "30s"
}
resource "gcp_projects_service" "vertexai" {
  depends_on = [time_sleep.wait_60_seconds]
  service    = "aiplatform.googleapis.com"
  project    = gcp_organizations_project.project.project_id
}
resource "gcp_bigquery_datasetiammember" "viewer" {
  depends_on = [gcp_vertex_aifeatureonlinestore.featureonlinestore]
  project    = data.gcp_organizations_getproject.testProject.project_id
  dataset_id = gcp_bigquery_dataset.sample_dataset.dataset_id
  role       = "roles/bigquery.dataViewer"
  member     ="serviceAccount:service-${gcp_organizations_project.project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com"
}
resource "gcp_vertex_aifeatureonlinestore" "featureonlinestore" {
  depends_on = [gcp_projects_service.vertexai]
  name       = "example_cross_project_featureview"
  project    = gcp_organizations_project.project.project_id
  labels = {
    "foo" = "bar"
  }
  region = "us-central1"
  bigtable = {
    auto_scaling = {
      min_node_count         = 1
      max_node_count         = 2
      cpu_utilization_target = 80
    }
  }
}
resource "gcp_bigquery_dataset" "sample_dataset" {
  dataset_id    = "example_cross_project_featureview"
  friendly_name = "test"
  description   = "This is a test description"
  location      = "US"
}
resource "gcp_bigquery_table" "sample_table" {
  deletion_protection = false
  dataset_id          = gcp_bigquery_dataset.sample_dataset.dataset_id
  table_id            = "example_cross_project_featureview"
  schema              = "[\n    {\n        \\\"name\\\": \\\"feature_id\\\",\n        \\\"type\\\": \\\"STRING\\\",\n        \\\"mode\\\": \\\"NULLABLE\\\"\n    },\n    {\n        \\\"name\\\": \\\"example_cross_project_featureview\\\",\n        \\\"type\\\": \\\"STRING\\\",\n        \\\"mode\\\": \\\"NULLABLE\\\"\n    },\n    {\n        \\\"name\\\": \\\"feature_timestamp\\\",\n        \\\"type\\\": \\\"TIMESTAMP\\\",\n        \\\"mode\\\": \\\"NULLABLE\\\"\n    }\n]\n"
}
resource "gcp_vertex_aifeaturegroup" "sample_feature_group" {
  name        = "example_cross_project_featureview"
  description = "A sample feature group"
  region      = "us-central1"
  labels = {
    "label-one" = "value-one"
  }
  big_query = {
    big_query_source = {
      input_uri ="bq://${gcp_bigquery_table.sample_table.project}.${gcp_bigquery_table.sample_table.dataset_id}.${gcp_bigquery_table.sample_table.table_id}"
    }
    entity_id_columns = ["feature_id"]
  }
}
resource "gcp_vertex_aifeaturegroupfeature" "sample_feature" {
  name          = "example_cross_project_featureview"
  region        = "us-central1"
  feature_group = gcp_vertex_aifeaturegroup.sample_feature_group.name
  description   = "A sample feature"
  labels = {
    "label-one" = "value-one"
  }
}
resource "gcp_vertex_aifeatureonlinestorefeatureview" "cross_project_featureview" {
  depends_on           = [gcp_projects_service.vertexai, time_sleep.wait_30_seconds]
  name                 = "example_cross_project_featureview"
  project              = gcp_organizations_project.project.project_id
  region               = "us-central1"
  feature_online_store = gcp_vertex_aifeatureonlinestore.featureonlinestore.name
  sync_config = {
    continuous = true
  }
  feature_registry_source = {
    feature_groups = [{
      "featureGroupId" = gcp_vertex_aifeaturegroup.sample_feature_group.name
      "featureIds"     = [gcp_vertex_aifeaturegroupfeature.sample_feature.name]
    }]
    project_number = data.gcp_organizations_getproject.testProject.number
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumiverse.time.Sleep;
import com.pulumiverse.time.SleepArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.vertex.AiFeatureOnlineStore;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreBigtableArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreBigtableAutoScalingArgs;
import com.pulumi.gcp.bigquery.Dataset;
import com.pulumi.gcp.bigquery.DatasetArgs;
import com.pulumi.gcp.bigquery.DatasetIamMember;
import com.pulumi.gcp.bigquery.DatasetIamMemberArgs;
import com.pulumi.gcp.bigquery.Table;
import com.pulumi.gcp.bigquery.TableArgs;
import com.pulumi.gcp.vertex.AiFeatureGroup;
import com.pulumi.gcp.vertex.AiFeatureGroupArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureGroupBigQueryArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureGroupBigQueryBigQuerySourceArgs;
import com.pulumi.gcp.vertex.AiFeatureGroupFeature;
import com.pulumi.gcp.vertex.AiFeatureGroupFeatureArgs;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureview;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureviewArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testProject = OrganizationsFunctions.getProject(GetProjectArgs.builder()
            .build());

        var project = new Project("project", ProjectArgs.builder()
            .projectId("tf-test_79241")
            .name("tf-test_57926")
            .orgId("123456789")
            .billingAccount("000000-0000000-0000000-000000")
            .deletionPolicy("DELETE")
            .build());

        var wait60Seconds = new Sleep("wait60Seconds", SleepArgs.builder()
            .createDuration("60s")
            .build(), CustomResourceOptions.builder()
                .dependsOn(project)
                .build());

        var vertexai = new Service("vertexai", ServiceArgs.builder()
            .service("aiplatform.googleapis.com")
            .project(project.projectId())
            .build(), CustomResourceOptions.builder()
                .dependsOn(wait60Seconds)
                .build());

        var featureonlinestore = new AiFeatureOnlineStore("featureonlinestore", AiFeatureOnlineStoreArgs.builder()
            .name("example_cross_project_featureview")
            .project(project.projectId())
            .labels(Map.of("foo", "bar"))
            .region("us-central1")
            .bigtable(AiFeatureOnlineStoreBigtableArgs.builder()
                .autoScaling(AiFeatureOnlineStoreBigtableAutoScalingArgs.builder()
                    .minNodeCount(1)
                    .maxNodeCount(2)
                    .cpuUtilizationTarget(80)
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(vertexai)
                .build());

        var sampleDataset = new Dataset("sampleDataset", DatasetArgs.builder()
            .datasetId("example_cross_project_featureview")
            .friendlyName("test")
            .description("This is a test description")
            .location("US")
            .build());

        var viewer = new DatasetIamMember("viewer", DatasetIamMemberArgs.builder()
            .project(testProject.projectId())
            .datasetId(sampleDataset.datasetId())
            .role("roles/bigquery.dataViewer")
            .member(project.number().applyValue(_number -> String.format("serviceAccount:service-%s@gcp-sa-aiplatform.iam.gserviceaccount.com", _number)))
            .build(), CustomResourceOptions.builder()
                .dependsOn(featureonlinestore)
                .build());

        var wait30Seconds = new Sleep("wait30Seconds", SleepArgs.builder()
            .createDuration("30s")
            .build(), CustomResourceOptions.builder()
                .dependsOn(viewer)
                .build());

        var sampleTable = new Table("sampleTable", TableArgs.builder()
            .deletionProtection(false)
            .datasetId(sampleDataset.datasetId())
            .tableId("example_cross_project_featureview")
            .schema("""
[
    {
        \"name\": \"feature_id\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"example_cross_project_featureview\",
        \"type\": \"STRING\",
        \"mode\": \"NULLABLE\"
    },
    {
        \"name\": \"feature_timestamp\",
        \"type\": \"TIMESTAMP\",
        \"mode\": \"NULLABLE\"
    }
]
            """)
            .build());

        var sampleFeatureGroup = new AiFeatureGroup("sampleFeatureGroup", AiFeatureGroupArgs.builder()
            .name("example_cross_project_featureview")
            .description("A sample feature group")
            .region("us-central1")
            .labels(Map.of("label-one", "value-one"))
            .bigQuery(AiFeatureGroupBigQueryArgs.builder()
                .bigQuerySource(AiFeatureGroupBigQueryBigQuerySourceArgs.builder()
                    .inputUri(Output.tuple(sampleTable.project(), sampleTable.datasetId(), sampleTable.tableId()).applyValue(values -> {
                        var project = values.t1;
                        var datasetId = values.t2;
                        var tableId = values.t3;
                        return String.format("bq://%s.%s.%s", project,datasetId,tableId);
                    }))
                    .build())
                .entityIdColumns("feature_id")
                .build())
            .build());

        var sampleFeature = new AiFeatureGroupFeature("sampleFeature", AiFeatureGroupFeatureArgs.builder()
            .name("example_cross_project_featureview")
            .region("us-central1")
            .featureGroup(sampleFeatureGroup.name())
            .description("A sample feature")
            .labels(Map.of("label-one", "value-one"))
            .build());

        var crossProjectFeatureview = new AiFeatureOnlineStoreFeatureview("crossProjectFeatureview", AiFeatureOnlineStoreFeatureviewArgs.builder()
            .name("example_cross_project_featureview")
            .project(project.projectId())
            .region("us-central1")
            .featureOnlineStore(featureonlinestore.name())
            .syncConfig(AiFeatureOnlineStoreFeatureviewSyncConfigArgs.builder()
                .continuous(true)
                .build())
            .featureRegistrySource(AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceArgs.builder()
                .featureGroups(AiFeatureOnlineStoreFeatureviewFeatureRegistrySourceFeatureGroupArgs.builder()
                    .featureGroupId(sampleFeatureGroup.name())
                    .featureIds(sampleFeature.name())
                    .build())
                .projectNumber(testProject.number())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(
                    vertexai,
                    wait30Seconds)
                .build());

    }
}
resources:
  project:
    type: gcp:organizations:Project
    properties:
      projectId: tf-test_79241
      name: tf-test_57926
      orgId: '123456789'
      billingAccount: 000000-0000000-0000000-000000
      deletionPolicy: DELETE
  wait60Seconds:
    type: time:Sleep
    name: wait_60_seconds
    properties:
      createDuration: 60s
    options:
      dependsOn:
        - ${project}
  wait30Seconds:
    type: time:Sleep
    name: wait_30_seconds
    properties:
      createDuration: 30s
    options:
      dependsOn:
        - ${viewer}
  vertexai:
    type: gcp:projects:Service
    properties:
      service: aiplatform.googleapis.com
      project: ${project.projectId}
    options:
      dependsOn:
        - ${wait60Seconds}
  viewer:
    type: gcp:bigquery:DatasetIamMember
    properties:
      project: ${testProject.projectId}
      datasetId: ${sampleDataset.datasetId}
      role: roles/bigquery.dataViewer
      member: serviceAccount:service-${project.number}@gcp-sa-aiplatform.iam.gserviceaccount.com
    options:
      dependsOn:
        - ${featureonlinestore}
  featureonlinestore:
    type: gcp:vertex:AiFeatureOnlineStore
    properties:
      name: example_cross_project_featureview
      project: ${project.projectId}
      labels:
        foo: bar
      region: us-central1
      bigtable:
        autoScaling:
          minNodeCount: 1
          maxNodeCount: 2
          cpuUtilizationTarget: 80
    options:
      dependsOn:
        - ${vertexai}
  sampleDataset:
    type: gcp:bigquery:Dataset
    name: sample_dataset
    properties:
      datasetId: example_cross_project_featureview
      friendlyName: test
      description: This is a test description
      location: US
  sampleTable:
    type: gcp:bigquery:Table
    name: sample_table
    properties:
      deletionProtection: false
      datasetId: ${sampleDataset.datasetId}
      tableId: example_cross_project_featureview
      schema: |
        [
            {
                \"name\": \"feature_id\",
                \"type\": \"STRING\",
                \"mode\": \"NULLABLE\"
            },
            {
                \"name\": \"example_cross_project_featureview\",
                \"type\": \"STRING\",
                \"mode\": \"NULLABLE\"
            },
            {
                \"name\": \"feature_timestamp\",
                \"type\": \"TIMESTAMP\",
                \"mode\": \"NULLABLE\"
            }
        ]
  sampleFeatureGroup:
    type: gcp:vertex:AiFeatureGroup
    name: sample_feature_group
    properties:
      name: example_cross_project_featureview
      description: A sample feature group
      region: us-central1
      labels:
        label-one: value-one
      bigQuery:
        bigQuerySource:
          inputUri: bq://${sampleTable.project}.${sampleTable.datasetId}.${sampleTable.tableId}
        entityIdColumns:
          - feature_id
  sampleFeature:
    type: gcp:vertex:AiFeatureGroupFeature
    name: sample_feature
    properties:
      name: example_cross_project_featureview
      region: us-central1
      featureGroup: ${sampleFeatureGroup.name}
      description: A sample feature
      labels:
        label-one: value-one
  crossProjectFeatureview:
    type: gcp:vertex:AiFeatureOnlineStoreFeatureview
    name: cross_project_featureview
    properties:
      name: example_cross_project_featureview
      project: ${project.projectId}
      region: us-central1
      featureOnlineStore: ${featureonlinestore.name}
      syncConfig:
        continuous: true
      featureRegistrySource:
        featureGroups:
          - featureGroupId: ${sampleFeatureGroup.name}
            featureIds:
              - ${sampleFeature.name}
        projectNumber: ${testProject.number}
    options:
      dependsOn:
        - ${vertexai}
        - ${wait30Seconds}
variables:
  testProject:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const featureonlinestore = new gcp.vertex.AiFeatureOnlineStore("featureonlinestore", {
    name: "example_feature_view_vector_search",
    labels: {
        foo: "bar",
    },
    region: "us-central1",
    optimized: {},
    embeddingManagement: {
        enabled: true,
    },
});
const tf_test_dataset = new gcp.bigquery.Dataset("tf-test-dataset", {
    datasetId: "example_feature_view_vector_search",
    friendlyName: "test",
    description: "This is a test description",
    location: "US",
});
const tf_test_table = new gcp.bigquery.Table("tf-test-table", {
    deletionProtection: false,
    datasetId: tf_test_dataset.datasetId,
    tableId: "example_feature_view_vector_search",
    schema: `[
{
  \\"name\\": \\"test_primary_id\\",
  \\"mode\\": \\"NULLABLE\\",
  \\"type\\": \\"STRING\\",
  \\"description\\": \\"primary test id\\"
},
{
  \\"name\\": \\"embedding\\",
  \\"mode\\": \\"REPEATED\\",
  \\"type\\": \\"FLOAT\\",
  \\"description\\": \\"embedding column for primary_id column\\"
},
{
  \\"name\\": \\"country\\",
  \\"mode\\": \\"NULLABLE\\",
  \\"type\\": \\"STRING\\",
  \\"description\\": \\"country\\"
},
{
  \\"name\\": \\"test_crowding_column\\",
  \\"mode\\": \\"NULLABLE\\",
  \\"type\\": \\"INTEGER\\",
  \\"description\\": \\"test crowding column\\"
},
{
  \\"name\\": \\"entity_id\\",
  \\"mode\\": \\"NULLABLE\\",
  \\"type\\": \\"STRING\\",
  \\"description\\": \\"Test default entity_id\\"
},
{
  \\"name\\": \\"test_entity_column\\",
  \\"mode\\": \\"NULLABLE\\",
  \\"type\\": \\"STRING\\",
  \\"description\\": \\"test secondary entity column\\"
},
{
  \\"name\\": \\"feature_timestamp\\",
  \\"mode\\": \\"NULLABLE\\",
  \\"type\\": \\"TIMESTAMP\\",
  \\"description\\": \\"Default timestamp value\\"
}
]
`,
});
const featureviewVectorSearch = new gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview_vector_search", {
    name: "example_feature_view_vector_search",
    region: "us-central1",
    featureOnlineStore: featureonlinestore.name,
    syncConfig: {
        cron: "0 0 * * *",
    },
    bigQuerySource: {
        uri: pulumi.interpolate`bq://${tf_test_table.project}.${tf_test_table.datasetId}.${tf_test_table.tableId}`,
        entityIdColumns: ["test_entity_column"],
    },
    vectorSearchConfig: {
        embeddingColumn: "embedding",
        filterColumns: ["country"],
        crowdingColumn: "test_crowding_column",
        distanceMeasureType: "DOT_PRODUCT_DISTANCE",
        treeAhConfig: {
            leafNodeEmbeddingCount: "1000",
        },
        embeddingDimension: 2,
    },
});
const project = gcp.organizations.getProject({});
import pulumi
import pulumi_gcp as gcp

featureonlinestore = gcp.vertex.AiFeatureOnlineStore("featureonlinestore",
    name="example_feature_view_vector_search",
    labels={
        "foo": "bar",
    },
    region="us-central1",
    optimized={},
    embedding_management={
        "enabled": True,
    })
tf_test_dataset = gcp.bigquery.Dataset("tf-test-dataset",
    dataset_id="example_feature_view_vector_search",
    friendly_name="test",
    description="This is a test description",
    location="US")
tf_test_table = gcp.bigquery.Table("tf-test-table",
    deletion_protection=False,
    dataset_id=tf_test_dataset.dataset_id,
    table_id="example_feature_view_vector_search",
    schema="""[
{
  \"name\": \"test_primary_id\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"primary test id\"
},
{
  \"name\": \"embedding\",
  \"mode\": \"REPEATED\",
  \"type\": \"FLOAT\",
  \"description\": \"embedding column for primary_id column\"
},
{
  \"name\": \"country\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"country\"
},
{
  \"name\": \"test_crowding_column\",
  \"mode\": \"NULLABLE\",
  \"type\": \"INTEGER\",
  \"description\": \"test crowding column\"
},
{
  \"name\": \"entity_id\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"Test default entity_id\"
},
{
  \"name\": \"test_entity_column\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"test secondary entity column\"
},
{
  \"name\": \"feature_timestamp\",
  \"mode\": \"NULLABLE\",
  \"type\": \"TIMESTAMP\",
  \"description\": \"Default timestamp value\"
}
]
""")
featureview_vector_search = gcp.vertex.AiFeatureOnlineStoreFeatureview("featureview_vector_search",
    name="example_feature_view_vector_search",
    region="us-central1",
    feature_online_store=featureonlinestore.name,
    sync_config={
        "cron": "0 0 * * *",
    },
    big_query_source={
        "uri": pulumi.Output.all(
            project=tf_test_table.project,
            dataset_id=tf_test_table.dataset_id,
            table_id=tf_test_table.table_id
).apply(lambda resolved_outputs: f"bq://{resolved_outputs['project']}.{resolved_outputs['dataset_id']}.{resolved_outputs['table_id']}")
,
        "entity_id_columns": ["test_entity_column"],
    },
    vector_search_config={
        "embedding_column": "embedding",
        "filter_columns": ["country"],
        "crowding_column": "test_crowding_column",
        "distance_measure_type": "DOT_PRODUCT_DISTANCE",
        "tree_ah_config": {
            "leaf_node_embedding_count": "1000",
        },
        "embedding_dimension": 2,
    })
project = gcp.organizations.get_project()
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var featureonlinestore = new Gcp.Vertex.AiFeatureOnlineStore("featureonlinestore", new()
    {
        Name = "example_feature_view_vector_search",
        Labels =
        {
            { "foo", "bar" },
        },
        Region = "us-central1",
        Optimized = new() { },
        EmbeddingManagement = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreEmbeddingManagementArgs
        {
            Enabled = true,
        },
    });

    var tf_test_dataset = new Gcp.BigQuery.Dataset("tf-test-dataset", new()
    {
        DatasetId = "example_feature_view_vector_search",
        FriendlyName = "test",
        Description = "This is a test description",
        Location = "US",
    });

    var tf_test_table = new Gcp.BigQuery.Table("tf-test-table", new()
    {
        DeletionProtection = false,
        DatasetId = tf_test_dataset.DatasetId,
        TableId = "example_feature_view_vector_search",
        Schema = @"[
{
  \""name\"": \""test_primary_id\"",
  \""mode\"": \""NULLABLE\"",
  \""type\"": \""STRING\"",
  \""description\"": \""primary test id\""
},
{
  \""name\"": \""embedding\"",
  \""mode\"": \""REPEATED\"",
  \""type\"": \""FLOAT\"",
  \""description\"": \""embedding column for primary_id column\""
},
{
  \""name\"": \""country\"",
  \""mode\"": \""NULLABLE\"",
  \""type\"": \""STRING\"",
  \""description\"": \""country\""
},
{
  \""name\"": \""test_crowding_column\"",
  \""mode\"": \""NULLABLE\"",
  \""type\"": \""INTEGER\"",
  \""description\"": \""test crowding column\""
},
{
  \""name\"": \""entity_id\"",
  \""mode\"": \""NULLABLE\"",
  \""type\"": \""STRING\"",
  \""description\"": \""Test default entity_id\""
},
{
  \""name\"": \""test_entity_column\"",
  \""mode\"": \""NULLABLE\"",
  \""type\"": \""STRING\"",
  \""description\"": \""test secondary entity column\""
},
{
  \""name\"": \""feature_timestamp\"",
  \""mode\"": \""NULLABLE\"",
  \""type\"": \""TIMESTAMP\"",
  \""description\"": \""Default timestamp value\""
}
]
",
    });

    var featureviewVectorSearch = new Gcp.Vertex.AiFeatureOnlineStoreFeatureview("featureview_vector_search", new()
    {
        Name = "example_feature_view_vector_search",
        Region = "us-central1",
        FeatureOnlineStore = featureonlinestore.Name,
        SyncConfig = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs
        {
            Cron = "0 0 * * *",
        },
        BigQuerySource = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs
        {
            Uri = Output.Tuple(tf_test_table.Project, tf_test_table.DatasetId, tf_test_table.TableId).Apply(values =>
            {
                var project = values.Item1;
                var datasetId = values.Item2;
                var tableId = values.Item3;
                return $"bq://{project}.{datasetId}.{tableId}";
            }),
            EntityIdColumns = new[]
            {
                "test_entity_column",
            },
        },
        VectorSearchConfig = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewVectorSearchConfigArgs
        {
            EmbeddingColumn = "embedding",
            FilterColumns = new[]
            {
                "country",
            },
            CrowdingColumn = "test_crowding_column",
            DistanceMeasureType = "DOT_PRODUCT_DISTANCE",
            TreeAhConfig = new Gcp.Vertex.Inputs.AiFeatureOnlineStoreFeatureviewVectorSearchConfigTreeAhConfigArgs
            {
                LeafNodeEmbeddingCount = "1000",
            },
            EmbeddingDimension = 2,
        },
    });

    var project = Gcp.Organizations.GetProject.Invoke();

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/bigquery"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/vertex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		featureonlinestore, err := vertex.NewAiFeatureOnlineStore(ctx, "featureonlinestore", &vertex.AiFeatureOnlineStoreArgs{
			Name: pulumi.String("example_feature_view_vector_search"),
			Labels: pulumi.StringMap{
				"foo": pulumi.String("bar"),
			},
			Region:    pulumi.String("us-central1"),
			Optimized: &vertex.AiFeatureOnlineStoreOptimizedArgs{},
			EmbeddingManagement: &vertex.AiFeatureOnlineStoreEmbeddingManagementArgs{
				Enabled: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		tf_test_dataset, err := bigquery.NewDataset(ctx, "tf-test-dataset", &bigquery.DatasetArgs{
			DatasetId:    pulumi.String("example_feature_view_vector_search"),
			FriendlyName: pulumi.String("test"),
			Description:  pulumi.String("This is a test description"),
			Location:     pulumi.String("US"),
		})
		if err != nil {
			return err
		}
		tf_test_table, err := bigquery.NewTable(ctx, "tf-test-table", &bigquery.TableArgs{
			DeletionProtection: pulumi.Bool(false),
			DatasetId:          tf_test_dataset.DatasetId,
			TableId:            pulumi.String("example_feature_view_vector_search"),
			Schema: pulumi.String(`[
{
  \"name\": \"test_primary_id\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"primary test id\"
},
{
  \"name\": \"embedding\",
  \"mode\": \"REPEATED\",
  \"type\": \"FLOAT\",
  \"description\": \"embedding column for primary_id column\"
},
{
  \"name\": \"country\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"country\"
},
{
  \"name\": \"test_crowding_column\",
  \"mode\": \"NULLABLE\",
  \"type\": \"INTEGER\",
  \"description\": \"test crowding column\"
},
{
  \"name\": \"entity_id\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"Test default entity_id\"
},
{
  \"name\": \"test_entity_column\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"test secondary entity column\"
},
{
  \"name\": \"feature_timestamp\",
  \"mode\": \"NULLABLE\",
  \"type\": \"TIMESTAMP\",
  \"description\": \"Default timestamp value\"
}
]
`),
		})
		if err != nil {
			return err
		}
		_, err = vertex.NewAiFeatureOnlineStoreFeatureview(ctx, "featureview_vector_search", &vertex.AiFeatureOnlineStoreFeatureviewArgs{
			Name:               pulumi.String("example_feature_view_vector_search"),
			Region:             pulumi.String("us-central1"),
			FeatureOnlineStore: featureonlinestore.Name,
			SyncConfig: &vertex.AiFeatureOnlineStoreFeatureviewSyncConfigArgs{
				Cron: pulumi.String("0 0 * * *"),
			},
			BigQuerySource: &vertex.AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs{
				Uri: pulumi.All(tf_test_table.Project, tf_test_table.DatasetId, tf_test_table.TableId).ApplyT(func(_args []interface{}) (string, error) {
					project := _args[0].(string)
					datasetId := _args[1].(string)
					tableId := _args[2].(string)
					return fmt.Sprintf("bq://%v.%v.%v", project, datasetId, tableId), nil
				}).(pulumi.StringOutput),
				EntityIdColumns: pulumi.StringArray{
					pulumi.String("test_entity_column"),
				},
			},
			VectorSearchConfig: &vertex.AiFeatureOnlineStoreFeatureviewVectorSearchConfigArgs{
				EmbeddingColumn: pulumi.String("embedding"),
				FilterColumns: pulumi.StringArray{
					pulumi.String("country"),
				},
				CrowdingColumn:      pulumi.String("test_crowding_column"),
				DistanceMeasureType: pulumi.String("DOT_PRODUCT_DISTANCE"),
				TreeAhConfig: &vertex.AiFeatureOnlineStoreFeatureviewVectorSearchConfigTreeAhConfigArgs{
					LeafNodeEmbeddingCount: pulumi.String("1000"),
				},
				EmbeddingDimension: pulumi.Int(2),
			},
		})
		if err != nil {
			return err
		}
		_, err = organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

data "gcp_organizations_getproject" "project" {
}

resource "gcp_vertex_aifeatureonlinestore" "featureonlinestore" {
  name = "example_feature_view_vector_search"
  labels = {
    "foo" = "bar"
  }
  region    = "us-central1"
  optimized = {}
  embedding_management = {
    enabled = true
  }
}
resource "gcp_bigquery_dataset" "tf-test-dataset" {
  dataset_id    = "example_feature_view_vector_search"
  friendly_name = "test"
  description   = "This is a test description"
  location      = "US"
}
resource "gcp_bigquery_table" "tf-test-table" {
  deletion_protection = false
  dataset_id          = gcp_bigquery_dataset.tf-test-dataset.dataset_id
  table_id            = "example_feature_view_vector_search"
  schema              = "[\n{\n  \\\"name\\\": \\\"test_primary_id\\\",\n  \\\"mode\\\": \\\"NULLABLE\\\",\n  \\\"type\\\": \\\"STRING\\\",\n  \\\"description\\\": \\\"primary test id\\\"\n},\n{\n  \\\"name\\\": \\\"embedding\\\",\n  \\\"mode\\\": \\\"REPEATED\\\",\n  \\\"type\\\": \\\"FLOAT\\\",\n  \\\"description\\\": \\\"embedding column for primary_id column\\\"\n},\n{\n  \\\"name\\\": \\\"country\\\",\n  \\\"mode\\\": \\\"NULLABLE\\\",\n  \\\"type\\\": \\\"STRING\\\",\n  \\\"description\\\": \\\"country\\\"\n},\n{\n  \\\"name\\\": \\\"test_crowding_column\\\",\n  \\\"mode\\\": \\\"NULLABLE\\\",\n  \\\"type\\\": \\\"INTEGER\\\",\n  \\\"description\\\": \\\"test crowding column\\\"\n},\n{\n  \\\"name\\\": \\\"entity_id\\\",\n  \\\"mode\\\": \\\"NULLABLE\\\",\n  \\\"type\\\": \\\"STRING\\\",\n  \\\"description\\\": \\\"Test default entity_id\\\"\n},\n{\n  \\\"name\\\": \\\"test_entity_column\\\",\n  \\\"mode\\\": \\\"NULLABLE\\\",\n  \\\"type\\\": \\\"STRING\\\",\n  \\\"description\\\": \\\"test secondary entity column\\\"\n},\n{\n  \\\"name\\\": \\\"feature_timestamp\\\",\n  \\\"mode\\\": \\\"NULLABLE\\\",\n  \\\"type\\\": \\\"TIMESTAMP\\\",\n  \\\"description\\\": \\\"Default timestamp value\\\"\n}\n]\n"
}
resource "gcp_vertex_aifeatureonlinestorefeatureview" "featureview_vector_search" {
  name                 = "example_feature_view_vector_search"
  region               = "us-central1"
  feature_online_store = gcp_vertex_aifeatureonlinestore.featureonlinestore.name
  sync_config = {
    cron = "0 0 * * *"
  }
  big_query_source = {
    uri               ="bq://${gcp_bigquery_table.tf-test-table.project}.${gcp_bigquery_table.tf-test-table.dataset_id}.${gcp_bigquery_table.tf-test-table.table_id}"
    entity_id_columns = ["test_entity_column"]
  }
  vector_search_config = {
    embedding_column      = "embedding"
    filter_columns        = ["country"]
    crowding_column       = "test_crowding_column"
    distance_measure_type = "DOT_PRODUCT_DISTANCE"
    tree_ah_config = {
      leaf_node_embedding_count = "1000"
    }
    embedding_dimension = "2"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vertex.AiFeatureOnlineStore;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreOptimizedArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreEmbeddingManagementArgs;
import com.pulumi.gcp.bigquery.Dataset;
import com.pulumi.gcp.bigquery.DatasetArgs;
import com.pulumi.gcp.bigquery.Table;
import com.pulumi.gcp.bigquery.TableArgs;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureview;
import com.pulumi.gcp.vertex.AiFeatureOnlineStoreFeatureviewArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewSyncConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewVectorSearchConfigArgs;
import com.pulumi.gcp.vertex.inputs.AiFeatureOnlineStoreFeatureviewVectorSearchConfigTreeAhConfigArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var featureonlinestore = new AiFeatureOnlineStore("featureonlinestore", AiFeatureOnlineStoreArgs.builder()
            .name("example_feature_view_vector_search")
            .labels(Map.of("foo", "bar"))
            .region("us-central1")
            .optimized(AiFeatureOnlineStoreOptimizedArgs.builder()
                .build())
            .embeddingManagement(AiFeatureOnlineStoreEmbeddingManagementArgs.builder()
                .enabled(true)
                .build())
            .build());

        var tf_test_dataset = new Dataset("tf-test-dataset", DatasetArgs.builder()
            .datasetId("example_feature_view_vector_search")
            .friendlyName("test")
            .description("This is a test description")
            .location("US")
            .build());

        var tf_test_table = new Table("tf-test-table", TableArgs.builder()
            .deletionProtection(false)
            .datasetId(tf_test_dataset.datasetId())
            .tableId("example_feature_view_vector_search")
            .schema("""
[
{
  \"name\": \"test_primary_id\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"primary test id\"
},
{
  \"name\": \"embedding\",
  \"mode\": \"REPEATED\",
  \"type\": \"FLOAT\",
  \"description\": \"embedding column for primary_id column\"
},
{
  \"name\": \"country\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"country\"
},
{
  \"name\": \"test_crowding_column\",
  \"mode\": \"NULLABLE\",
  \"type\": \"INTEGER\",
  \"description\": \"test crowding column\"
},
{
  \"name\": \"entity_id\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"Test default entity_id\"
},
{
  \"name\": \"test_entity_column\",
  \"mode\": \"NULLABLE\",
  \"type\": \"STRING\",
  \"description\": \"test secondary entity column\"
},
{
  \"name\": \"feature_timestamp\",
  \"mode\": \"NULLABLE\",
  \"type\": \"TIMESTAMP\",
  \"description\": \"Default timestamp value\"
}
]
            """)
            .build());

        var featureviewVectorSearch = new AiFeatureOnlineStoreFeatureview("featureviewVectorSearch", AiFeatureOnlineStoreFeatureviewArgs.builder()
            .name("example_feature_view_vector_search")
            .region("us-central1")
            .featureOnlineStore(featureonlinestore.name())
            .syncConfig(AiFeatureOnlineStoreFeatureviewSyncConfigArgs.builder()
                .cron("0 0 * * *")
                .build())
            .bigQuerySource(AiFeatureOnlineStoreFeatureviewBigQuerySourceArgs.builder()
                .uri(Output.tuple(tf_test_table.project(), tf_test_table.datasetId(), tf_test_table.tableId()).applyValue(values -> {
                    var project = values.t1;
                    var datasetId = values.t2;
                    var tableId = values.t3;
                    return String.format("bq://%s.%s.%s", project,datasetId,tableId);
                }))
                .entityIdColumns("test_entity_column")
                .build())
            .vectorSearchConfig(AiFeatureOnlineStoreFeatureviewVectorSearchConfigArgs.builder()
                .embeddingColumn("embedding")
                .filterColumns("country")
                .crowdingColumn("test_crowding_column")
                .distanceMeasureType("DOT_PRODUCT_DISTANCE")
                .treeAhConfig(AiFeatureOnlineStoreFeatureviewVectorSearchConfigTreeAhConfigArgs.builder()
                    .leafNodeEmbeddingCount("1000")
                    .build())
                .embeddingDimension(2)
                .build())
            .build());

        final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
            .build());

    }
}
resources:
  featureonlinestore:
    type: gcp:vertex:AiFeatureOnlineStore
    properties:
      name: example_feature_view_vector_search
      labels:
        foo: bar
      region: us-central1
      optimized: {}
      embeddingManagement:
        enabled: true
  tf-test-dataset:
    type: gcp:bigquery:Dataset
    properties:
      datasetId: example_feature_view_vector_search
      friendlyName: test
      description: This is a test description
      location: US
  tf-test-table:
    type: gcp:bigquery:Table
    properties:
      deletionProtection: false
      datasetId: ${["tf-test-dataset"].datasetId}
      tableId: example_feature_view_vector_search
      schema: |
        [
        {
          \"name\": \"test_primary_id\",
          \"mode\": \"NULLABLE\",
          \"type\": \"STRING\",
          \"description\": \"primary test id\"
        },
        {
          \"name\": \"embedding\",
          \"mode\": \"REPEATED\",
          \"type\": \"FLOAT\",
          \"description\": \"embedding column for primary_id column\"
        },
        {
          \"name\": \"country\",
          \"mode\": \"NULLABLE\",
          \"type\": \"STRING\",
          \"description\": \"country\"
        },
        {
          \"name\": \"test_crowding_column\",
          \"mode\": \"NULLABLE\",
          \"type\": \"INTEGER\",
          \"description\": \"test crowding column\"
        },
        {
          \"name\": \"entity_id\",
          \"mode\": \"NULLABLE\",
          \"type\": \"STRING\",
          \"description\": \"Test default entity_id\"
        },
        {
          \"name\": \"test_entity_column\",
          \"mode\": \"NULLABLE\",
          \"type\": \"STRING\",
          \"description\": \"test secondary entity column\"
        },
        {
          \"name\": \"feature_timestamp\",
          \"mode\": \"NULLABLE\",
          \"type\": \"TIMESTAMP\",
          \"description\": \"Default timestamp value\"
        }
        ]
  featureviewVectorSearch:
    type: gcp:vertex:AiFeatureOnlineStoreFeatureview
    name: featureview_vector_search
    properties:
      name: example_feature_view_vector_search
      region: us-central1
      featureOnlineStore: ${featureonlinestore.name}
      syncConfig:
        cron: 0 0 * * *
      bigQuerySource:
        uri: bq://${["tf-test-table"].project}.${["tf-test-table"].datasetId}.${["tf-test-table"].tableId}
        entityIdColumns:
          - test_entity_column
      vectorSearchConfig:
        embeddingColumn: embedding
        filterColumns:
          - country
        crowdingColumn: test_crowding_column
        distanceMeasureType: DOT_PRODUCT_DISTANCE
        treeAhConfig:
          leafNodeEmbeddingCount: '1000'
        embeddingDimension: '2'
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}

Import

FeatureOnlineStoreFeatureview can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews/{{name}}
  • {{project}}/{{region}}/{{feature_online_store}}/{{name}}
  • {{region}}/{{feature_online_store}}/{{name}}
  • {{feature_online_store}}/{{name}}

When using the pulumi import command, FeatureOnlineStoreFeatureview can be imported using one of the formats above. For example:

$ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews/{{name}}
$ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default {{project}}/{{region}}/{{feature_online_store}}/{{name}}
$ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default {{region}}/{{feature_online_store}}/{{name}}
$ pulumi import gcp:vertex/aiFeatureOnlineStoreFeatureview:AiFeatureOnlineStoreFeatureview default {{feature_online_store}}/{{name}}

Constructors

AiFeatureOnlineStoreFeatureview(String name, {AiFeatureOnlineStoreFeatureviewArgs? args, CustomResourceOptions? options})
Creates a new AiFeatureOnlineStoreFeatureview. name The Pulumi resource name. args Arguments used to configure this AiFeatureOnlineStoreFeatureview. The set of arguments for AiFeatureOnlineStoreFeatureview. options Resource options controlling this resource's behavior.
AiFeatureOnlineStoreFeatureview.reference(String urn)
Creates a typed reference to an existing AiFeatureOnlineStoreFeatureview resource.

Properties

bigQuerySource ↔ Output<AiFeatureOnlineStoreFeatureviewBigQuerySource?>
Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore. Structure is documented below.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createTime ↔ Output<String>
The timestamp of when the featureOnlinestore was created in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
effectiveLabels ↔ Output<Map<String, String>>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
featureOnlineStore ↔ Output<String>
The name of the FeatureOnlineStore to use for the featureview.
latefinal
featureRegistrySource ↔ Output<AiFeatureOnlineStoreFeatureviewFeatureRegistrySource?>
Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore. Structure is documented below.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
labels ↔ Output<Map<String, String>?>
A set of key/value label pairs to assign to this FeatureView.
latefinal
name ↔ Output<String>
Name of the FeatureView. This value may be up to 60 characters, and valid characters are a-z0-9_. The first character cannot be a number.
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
pulumiLabels ↔ Output<Map<String, String>>
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
region ↔ Output<String>
The region for the resource. It should be the same as the featureonlinestore region.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
syncConfig ↔ Output<AiFeatureOnlineStoreFeatureviewSyncConfig?>
Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving. Structure is documented below.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
updateTime ↔ Output<String>
The timestamp of when the featureOnlinestore was last updated in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits.
latefinal
urn ↔ Output<String>
latefinalinherited
vectorSearchConfig ↔ Output<AiFeatureOnlineStoreFeatureviewVectorSearchConfig?>
(Optional, Beta) Configuration for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving. Structure is documented below.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {AiFeatureOnlineStoreFeatureviewState? state, CustomResourceOptions? options}) → AiFeatureOnlineStoreFeatureview
Gets an existing AiFeatureOnlineStoreFeatureview resource's state with the given name and id.