diff --git a/mmv1/products/vertexai/api.yaml b/mmv1/products/vertexai/api.yaml index e62e71a89701..c1ca03cad874 100644 --- a/mmv1/products/vertexai/api.yaml +++ b/mmv1/products/vertexai/api.yaml @@ -109,14 +109,13 @@ objects: base_url: projects/{{project}}/locations/{{region}}/featurestores create_url: projects/{{project}}/locations/{{region}}/featurestores?featurestoreId={{name}} self_link: 'projects/{{project}}/locations/{{region}}/featurestores/{{name}}' - min_version: beta update_verb: :PATCH update_mask: true references: !ruby/object:Api::Resource::ReferenceLinks guides: 'Official Documentation': 'https://cloud.google.com/vertex-ai/docs' - api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featurestores' + api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores' async: !ruby/object:Api::OpAsync operation: !ruby/object:Api::OpAsync::Operation path: 'name' @@ -194,14 +193,13 @@ objects: base_url: '{{featurestore}}/entityTypes' create_url: '{{featurestore}}/entityTypes?entityTypeId={{name}}' self_link: '{{featurestore}}/entityTypes/{{name}}' - min_version: beta update_verb: :PATCH update_mask: true references: !ruby/object:Api::Resource::ReferenceLinks guides: 'Official Documentation': 'https://cloud.google.com/vertex-ai/docs' - api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featurestores.entityTypes' + api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores.entityTypes' async: !ruby/object:Api::OpAsync operation: !ruby/object:Api::OpAsync::Operation path: 'name' @@ -273,6 +271,8 @@ objects: The monitoring schedule for snapshot analysis. For EntityType-level config: unset / disabled = true indicates disabled by default for Features under it; otherwise by default enable snapshot analysis monitoring with monitoringInterval for Features under it. - !ruby/object:Api::Type::String name: 'monitoringInterval' + min_version: beta + deprecation_message: This field is unavailable in the GA provider and will be removed from the beta provider in a future release. description: | Configuration of the snapshot analysis based monitoring pipeline running interval. The value is rolled up to full day. @@ -284,14 +284,13 @@ objects: base_url: '{{entitytype}}/features' create_url: '{{entitytype}}/features?featureId={{name}}' self_link: '{{entitytype}}/features/{{name}}' - min_version: beta update_verb: :PATCH update_mask: true references: !ruby/object:Api::Resource::ReferenceLinks guides: 'Official Documentation': 'https://cloud.google.com/vertex-ai/docs' - api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1beta1/projects.locations.featurestores.entityTypes.features' + api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.featurestores.entityTypes.features' async: !ruby/object:Api::OpAsync operation: !ruby/object:Api::OpAsync::Operation path: 'name' diff --git a/mmv1/products/vertexai/terraform.yaml b/mmv1/products/vertexai/terraform.yaml index a8edc29f1d2e..2fb8639cada6 100644 --- a/mmv1/products/vertexai/terraform.yaml +++ b/mmv1/products/vertexai/terraform.yaml @@ -79,6 +79,19 @@ overrides: !ruby/object:Overrides::ResourceOverrides billing_account: :BILLING_ACCT test_vars_overrides: kms_key_name: 'BootstrapKMSKeyInLocation(t, "us-central1").CryptoKey.Name' + - !ruby/object:Provider::Terraform::Examples + name: "vertex_ai_featurestore_entitytype_with_beta_fields" + primary_resource_id: "entity" + vars: + name: "terraform2" + project: "vertex-ai" + kms_key_name: "kms-name" + test_env_vars: + org_id: :ORG_ID + billing_account: :BILLING_ACCT + test_vars_overrides: + kms_key_name: 'BootstrapKMSKeyInLocation(t, "us-central1").CryptoKey.Name' + min_version: beta properties: etag: !ruby/object:Overrides::Terraform::PropertyOverride ignore_read: true @@ -99,10 +112,14 @@ overrides: !ruby/object:Overrides::ResourceOverrides name: "terraform" project: "vertex-ai" kms_key_name: "kms-name" - test_env_vars: - org_id: :ORG_ID - billing_account: :BILLING_ACCT - test_vars_overrides: + - !ruby/object:Provider::Terraform::Examples + name: "vertex_ai_featurestore_entitytype_feature_with_beta_fields" + primary_resource_id: "feature" + vars: + name: "terraform2" + project: "vertex-ai" + kms_key_name: "kms-name" + min_version: beta properties: etag: !ruby/object:Overrides::Terraform::PropertyOverride ignore_read: true diff --git a/mmv1/templates/terraform/examples/vertex_ai_featurestore.tf.erb b/mmv1/templates/terraform/examples/vertex_ai_featurestore.tf.erb index 0eaefed1e142..db6057a6f5fc 100644 --- a/mmv1/templates/terraform/examples/vertex_ai_featurestore.tf.erb +++ b/mmv1/templates/terraform/examples/vertex_ai_featurestore.tf.erb @@ -1,5 +1,4 @@ resource "google_vertex_ai_featurestore" "featurestore" { - provider = google-beta name = "<%= ctx[:vars]['name'] %>" labels = { foo = "bar" diff --git a/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype.tf.erb b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype.tf.erb index c676aab0201c..a6bb99e0894b 100644 --- a/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype.tf.erb +++ b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype.tf.erb @@ -1,5 +1,4 @@ resource "google_vertex_ai_featurestore" "featurestore" { - provider = google-beta name = "<%= ctx[:vars]['name'] %>" labels = { foo = "bar" @@ -14,16 +13,9 @@ resource "google_vertex_ai_featurestore" "featurestore" { } resource "google_vertex_ai_featurestore_entitytype" "entity" { - provider = google-beta name = "<%= ctx[:vars]['name'] %>" labels = { foo = "bar" } featurestore = google_vertex_ai_featurestore.featurestore.id - monitoring_config { - snapshot_analysis { - disabled = false - monitoring_interval = "86400s" - } - } } diff --git a/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature.tf.erb b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature.tf.erb index e3b6fad54842..dd296cb57741 100644 --- a/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature.tf.erb +++ b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature.tf.erb @@ -1,5 +1,4 @@ resource "google_vertex_ai_featurestore" "featurestore" { - provider = google-beta name = "<%= ctx[:vars]['name'] %>" labels = { foo = "bar" @@ -11,22 +10,14 @@ resource "google_vertex_ai_featurestore" "featurestore" { } resource "google_vertex_ai_featurestore_entitytype" "entity" { - provider = google-beta name = "<%= ctx[:vars]['name'] %>" labels = { foo = "bar" } featurestore = google_vertex_ai_featurestore.featurestore.id - monitoring_config { - snapshot_analysis { - disabled = false - monitoring_interval = "86400s" - } - } } resource "google_vertex_ai_featurestore_entitytype_feature" "feature" { - provider = google-beta name = "<%= ctx[:vars]['name'] %>" labels = { foo = "bar" diff --git a/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature_with_beta_fields.tf.erb b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature_with_beta_fields.tf.erb new file mode 100644 index 000000000000..e3b6fad54842 --- /dev/null +++ b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_feature_with_beta_fields.tf.erb @@ -0,0 +1,37 @@ +resource "google_vertex_ai_featurestore" "featurestore" { + provider = google-beta + name = "<%= ctx[:vars]['name'] %>" + labels = { + foo = "bar" + } + region = "us-central1" + online_serving_config { + fixed_node_count = 2 + } +} + +resource "google_vertex_ai_featurestore_entitytype" "entity" { + provider = google-beta + name = "<%= ctx[:vars]['name'] %>" + labels = { + foo = "bar" + } + featurestore = google_vertex_ai_featurestore.featurestore.id + monitoring_config { + snapshot_analysis { + disabled = false + monitoring_interval = "86400s" + } + } +} + +resource "google_vertex_ai_featurestore_entitytype_feature" "feature" { + provider = google-beta + name = "<%= ctx[:vars]['name'] %>" + labels = { + foo = "bar" + } + entitytype = google_vertex_ai_featurestore_entitytype.entity.id + + value_type = "INT64_ARRAY" +} diff --git a/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_with_beta_fields.tf.erb b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_with_beta_fields.tf.erb new file mode 100644 index 000000000000..c676aab0201c --- /dev/null +++ b/mmv1/templates/terraform/examples/vertex_ai_featurestore_entitytype_with_beta_fields.tf.erb @@ -0,0 +1,29 @@ +resource "google_vertex_ai_featurestore" "featurestore" { + provider = google-beta + name = "<%= ctx[:vars]['name'] %>" + labels = { + foo = "bar" + } + region = "us-central1" + online_serving_config { + fixed_node_count = 2 + } + encryption_spec { + kms_key_name = "<%= ctx[:vars]['kms_key_name'] %>" + } +} + +resource "google_vertex_ai_featurestore_entitytype" "entity" { + provider = google-beta + name = "<%= ctx[:vars]['name'] %>" + labels = { + foo = "bar" + } + featurestore = google_vertex_ai_featurestore.featurestore.id + monitoring_config { + snapshot_analysis { + disabled = false + monitoring_interval = "86400s" + } + } +}