Skip to content

Commit

Permalink
update featureview name
Browse files Browse the repository at this point in the history
  • Loading branch information
kkram01 committed Jan 8, 2024
1 parent 753ee2e commit 2e90bf5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 26 deletions.
7 changes: 1 addition & 6 deletions mmv1/products/vertexai/FeatureOnlineStoreFeatureview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# limitations under the License.

--- !ruby/object:Api::Resource
name: FeatureOnlinestoreFeatureview
name: FeatureOnlineStoreFeatureview
base_url: projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews
create_url: projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews?featureViewId={{name}}
self_link: projects/{{project}}/locations/{{region}}/featureOnlineStores/{{feature_online_store}}/featureViews/{{name}}
Expand Down Expand Up @@ -77,11 +77,6 @@ properties:
valid characters are [a-z0-9_]. The first character cannot be a number.
immutable: true
url_param_only: true
- !ruby/object:Api::Type::String
name: 'etag'
description: Used to perform consistent read-modify-write updates.
output: true
ignore_read: true
- !ruby/object:Api::Type::String
name: 'createTime'
output: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ resource "google_bigquery_table" "tf-test-table" {
EOF
}

resource "google_vertex_ai_feature_onlinestore_featureview" "<%= ctx[:primary_resource_id] %>" {
resource "google_vertex_ai_feature_online_store_featureview" "<%= ctx[:primary_resource_id] %>" {
name = "<%= ctx[:vars]['name'] %>"
region = "us-central1"
feature_online_store = google_vertex_ai_feature_online_store.featureonlinestore.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/hashicorp/terraform-provider-google/google/acctest"
)

func TestAccVertexAIFeatureOnlinestoreFeatureview_vertexAiFeatureonlinestoreFeatureview_updated(t *testing.T) {
func TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_updated(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
Expand All @@ -21,34 +21,34 @@ func TestAccVertexAIFeatureOnlinestoreFeatureview_vertexAiFeatureonlinestoreFeat
acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
CheckDestroy: testAccCheckVertexAIFeatureOnlinestoreFeatureviewDestroyProducer(t),
CheckDestroy: testAccCheckVertexAIFeatureOnlineStoreFeatureviewDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccVertexAIFeatureOnlinestoreFeatureview_vertexAiFeatureonlinestoreFeatureview_basic(context),
Config: testAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_basic(context),
},
{
ResourceName: "google_vertex_ai_feature_onlinestore_featureview.featureview",
ResourceName: "google_vertex_ai_feature_online_store_featureview.featureview",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"name", "etag", "feature_online_store", "labels", "terraform_labels"},
},
{
Config: testAccVertexAIFeatureOnlinestoreFeatureview_vertexAiFeatureonlinestoreFeatureview_update(context),
Config: testAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_update(context),
},
{
ResourceName: "google_vertex_ai_feature_onlinestore_featureview.featureview",
ResourceName: "google_vertex_ai_feature_online_store_featureview.featureview",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"name", "etag", "feature_online_store", "labels", "terraform_labels"},
ImportStateVerifyIgnore: []string{"name", "feature_online_store", "labels", "terraform_labels"},
},
},
})
}

func testAccVertexAIFeatureOnlinestoreFeatureview_vertexAiFeatureonlinestoreFeatureview_basic(context map[string]interface{}) string {
func testAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_basic(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_vertex_ai_feature_online_store" "featureonlinestore" {
name = "tf_test_featureonlinestore12"
name = "tf_test_featureonlinestore%{random_suffix}"
labels = {
foo = "bar"
}
Expand All @@ -64,7 +64,7 @@ resource "google_vertex_ai_feature_online_store" "featureonlinestore" {
resource "google_bigquery_dataset" "tf-test-dataset" {
dataset_id = "tf_test_dataset1_featureview12"
dataset_id = "tf_test_dataset1_featureview%{random_suffix}"
friendly_name = "test"
description = "This is a test description"
location = "US"
Expand All @@ -74,7 +74,7 @@ resource "google_bigquery_table" "tf-test-table" {
deletion_protection = false
dataset_id = google_bigquery_dataset.tf-test-dataset.dataset_id
table_id = "tf_test_bq_table"
table_id = "tf_test_bq_table%{random_suffix}"
schema = <<EOF
[
{
Expand All @@ -99,8 +99,8 @@ resource "google_bigquery_table" "tf-test-table" {
EOF
}
resource "google_vertex_ai_feature_onlinestore_featureview" "featureview" {
name = "tf_test_tf_test_fv1%{random_suffix}"
resource "google_vertex_ai_feature_online_store_featureview" "featureview" {
name = "tf_test_fv%{random_suffix}"
region = "us-central1"
labels = {
foo = "bar"
Expand All @@ -122,10 +122,10 @@ data "google_project" "project" {
`, context)
}

func testAccVertexAIFeatureOnlinestoreFeatureview_vertexAiFeatureonlinestoreFeatureview_update(context map[string]interface{}) string {
func testAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureview_update(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_vertex_ai_feature_online_store" "featureonlinestore" {
name = "tf_test_featureonlinestore12"
name = "tf_test_featureonlinestore%{random_suffix}"
labels = {
foo1 = "bar1"
}
Expand All @@ -141,7 +141,7 @@ cpu_utilization_target = 80
resource "google_bigquery_dataset" "tf-test-dataset" {
dataset_id = "tf_test_dataset1_featureview12"
dataset_id = "tf_test_dataset1_featureview%{random_suffix}"
friendly_name = "test"
description = "This is a test description"
location = "US"
Expand All @@ -151,7 +151,7 @@ resource "google_bigquery_table" "tf-test-table" {
deletion_protection = false
dataset_id = google_bigquery_dataset.tf-test-dataset.dataset_id
table_id = "tf_test_bq_table"
table_id = "tf_test_bq_table%{random_suffix}"
schema = <<EOF
[
{
Expand All @@ -176,8 +176,8 @@ schema = <<EOF
EOF
}
resource "google_vertex_ai_feature_onlinestore_featureview" "featureview" {
name = "tf_test_tf_test_fv1%{random_suffix}"
resource "google_vertex_ai_feature_online_store_featureview" "featureview" {
name = "tf_test_fv%{random_suffix}"
region = "us-central1"
labels = {
foo1 = "bar1"
Expand Down

0 comments on commit 2e90bf5

Please sign in to comment.