Skip to content

Commit 8c98d52

Browse files
Automatically generated by magic modules for service: vertex_ai and resource: HyperparameterTuningJob.
This commit includes the following changes: - Singular Resource - Plural Resource - Documentation updates - Terraform configuration - Integration tests Signed-off-by: Samir Anand <sam.sunny001@gmail.com>
1 parent ca02c8e commit 8c98d52

9 files changed

+494
-112
lines changed

build/inspec/test/integration/build/gcp-mm.tf

+36-52
Original file line numberDiff line numberDiff line change
@@ -1360,72 +1360,56 @@ resource "google_healthcare_dataset" "default" {
13601360
}
13611361

13621362

1363-
resource "google_vertex_ai_featurestore" "featurestore" {
1364-
name = "terraform-${local.name_suffix}"
1365-
labels = {
1366-
foo = "bar"
1367-
}
1368-
region = "us-central1"
1369-
online_serving_config {
1370-
fixed_node_count = 2
1371-
}
1363+
resource "google_service_directory_namespace" "example" {
1364+
provider = google-beta
1365+
namespace_id = "example-namespace-${local.name_suffix}"
1366+
location = "us-central1"
13721367
}
13731368

1374-
resource "google_vertex_ai_featurestore_entitytype" "entity" {
1375-
name = "terraform-${local.name_suffix}"
1376-
labels = {
1377-
foo = "bar"
1378-
}
1379-
featurestore = google_vertex_ai_featurestore.featurestore.id
1369+
resource "google_service_directory_service" "example" {
1370+
provider = google-beta
1371+
service_id = "example-service-${local.name_suffix}"
1372+
namespace = google_service_directory_namespace.example.id
13801373
}
13811374

1382-
resource "google_vertex_ai_featurestore_entitytype_feature" "feature" {
1383-
name = "terraform-${local.name_suffix}"
1384-
labels = {
1385-
foo = "bar"
1386-
}
1387-
entitytype = google_vertex_ai_featurestore_entitytype.entity.id
1388-
1389-
value_type = "INT64_ARRAY"
1390-
}
1375+
resource "google_service_directory_endpoint" "example" {
1376+
provider = google-beta
1377+
endpoint_id = "example-endpoint-${local.name_suffix}"
1378+
service = google_service_directory_service.example.id
13911379

1392-
resource "google_vertex_ai_tensorboard" "tensorboard" {
1393-
display_name = "terraform-${local.name_suffix}"
1394-
description = "sample description"
1395-
labels = {
1396-
"key1" : "value1",
1397-
"key2" : "value2"
1380+
metadata = {
1381+
stage = "prod"
1382+
region = "us-central1"
13981383
}
1399-
region = "us-central1"
1384+
1385+
address = "1.2.3.4"
1386+
port = 5353
14001387
}
14011388

14021389

1403-
resource "google_vertex_ai_featurestore" "featurestore" {
1404-
name = "terraform-${local.name_suffix}"
1405-
labels = {
1406-
foo = "bar"
1407-
}
1408-
region = "us-central1"
1409-
online_serving_config {
1410-
fixed_node_count = 2
1411-
}
1390+
resource "google_service_directory_namespace" "example" {
1391+
provider = google-beta
1392+
namespace_id = "example-namespace-${local.name_suffix}"
1393+
location = "us-central1"
14121394
}
14131395

1414-
resource "google_vertex_ai_featurestore_entitytype" "entity" {
1415-
name = "terraform-${local.name_suffix}"
1416-
labels = {
1417-
foo = "bar"
1418-
}
1419-
featurestore = google_vertex_ai_featurestore.featurestore.id
1396+
resource "google_service_directory_service" "example" {
1397+
provider = google-beta
1398+
service_id = "example-service-${local.name_suffix}"
1399+
namespace = google_service_directory_namespace.example.id
14201400
}
14211401

1422-
resource "google_vertex_ai_featurestore_entitytype_feature" "feature" {
1423-
name = "terraform-${local.name_suffix}"
1424-
labels = {
1425-
foo = "bar"
1402+
resource "google_service_directory_endpoint" "example" {
1403+
provider = google-beta
1404+
endpoint_id = "example-endpoint-${local.name_suffix}"
1405+
service = google_service_directory_service.example.id
1406+
1407+
metadata = {
1408+
stage = "prod"
1409+
region = "us-central1"
14261410
}
1427-
entitytype = google_vertex_ai_featurestore_entitytype.entity.id
14281411

1429-
value_type = "INT64_ARRAY"
1412+
address = "1.2.3.4"
1413+
port = 5353
14301414
}
14311415

build/inspec/test/integration/configuration/mm-attributes.yml

+22-60
Original file line numberDiff line numberDiff line change
@@ -546,104 +546,66 @@ dlp:
546546
location: "europe-west2"
547547
type: "Infotype"
548548

549-
pipeline_job:
549+
training_pipeline:
550550
name : "value_name"
551+
job_id: "job_id"
551552
region : "value_region"
552553
parent : "value_parent"
553-
end_time : "value_endtime"
554-
update_time : "value_updatetime"
555-
state : "value_state"
556-
create_time : "value_createtime"
557-
schedule_name : "value_schedulename"
558-
start_time : "value_starttime"
559-
service_account : "value_serviceaccount"
560-
display_name : "value_displayname"
561-
template_uri : "value_templateuri"
562-
network : "value_network"
563554

564-
endpoint:
555+
556+
nas_job:
565557
name : "value_name"
566558
region : "value_region"
567559
parent : "value_parent"
568-
update_time : "value_updatetime"
569-
model_deployment_monitoring_job : "value_modeldeploymentmonitoringjob"
570-
description : "value_description"
571-
network : "value_network"
572-
display_name : "value_displayname"
573-
etag : "value_etag"
560+
end_time : "value_endtime"
561+
state : "value_state"
574562
create_time : "value_createtime"
563+
display_name : "value_displayname"
564+
start_time : "value_starttime"
565+
update_time : "value_updatetime"
575566

576567
batch_prediction_job:
577568
name : "value_name"
578569
region : "value_region"
570+
parent : "value_parent"
579571
create_time : "value_createtime"
580-
model_version_id : "1"
572+
model_version_id : "value_modelversionid"
581573
end_time : "value_endtime"
582574
start_time : "value_starttime"
583575
update_time : "value_updatetime"
584576
state : "value_state"
585577
model : "value_model"
586578
display_name : "value_displayname"
579+
service_account : "value_serviceaccount"
587580

588581
custom_job:
589-
name : "value_name"
590-
region : "value_region"
591-
parent : "value_parent"
592-
job_id: "job_id"
593-
594-
training_pipeline:
595582
name : "value_name"
596583
job_id: "job_id"
597584
region : "value_region"
598585
parent : "value_parent"
599586

587+
region_security_policy:
588+
securitypolicy : "value_securitypolicy"
600589

601-
schedule:
590+
endpoint:
602591
name : "value_name"
603592
region : "value_region"
604593
parent : "value_parent"
605-
started_run_count : "value_startedruncount"
606-
cron : "value_cron"
607-
last_pause_time : "value_lastpausetime"
608-
create_time : "value_createtime"
609-
start_time : "value_starttime"
610-
max_run_count : "value_maxruncount"
611-
next_run_time : "value_nextruntime"
612594
update_time : "value_updatetime"
613-
last_resume_time : "value_lastresumetime"
614-
max_concurrent_run_count : "value_maxconcurrentruncount"
615-
state : "value_state"
595+
model_deployment_monitoring_job : "value_modeldeploymentmonitoringjob"
596+
description : "value_description"
597+
network : "value_network"
616598
display_name : "value_displayname"
617-
end_time : "value_endtime"
618-
619-
tensorboard:
620-
name : "value_name"
621-
region : "value_region"
622-
parent : "value_parent"
623-
update_time : "value_updatetime"
624-
blob_storage_path_prefix : "value_blobstoragepathprefix"
625599
etag : "value_etag"
626600
create_time : "value_createtime"
627-
display_name : "value_displayname"
628-
description : "value_description"
629601

630-
631-
nas_job:
602+
hyperparameter_tuning_job:
632603
name : "value_name"
633604
region : "value_region"
634605
parent : "value_parent"
635-
end_time : "value_endtime"
636606
state : "value_state"
637-
create_time : "value_createtime"
638-
display_name : "value_displayname"
639-
start_time : "value_starttime"
607+
end_time : "value_endtime"
640608
update_time : "value_updatetime"
641-
642-
featurestore:
643-
name : "value_name"
644-
region : "value_region"
645-
parent : "value_parent"
646-
state : "value_state"
609+
start_time : "value_starttime"
647610
create_time : "value_createtime"
648-
etag : "value_etag"
649-
update_time : "value_updatetime"
611+
display_name : "value_displayname"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: About the google_vertex_ai_hyperparameter_tuning_job resource
3+
platform: gcp
4+
---
5+
6+
## Syntax
7+
A `google_vertex_ai_hyperparameter_tuning_job` is used to test a Google HyperparameterTuningJob resource
8+
9+
## Examples
10+
```
11+
describe google_vertex_ai_hyperparameter_tuning_job(name: "projects/#{gcp_project_id}/locations/#{hyperparameter_tuning_job['region']}/hyperparameterTuningJobs/#{hyperparameter_tuning_job['name']}", region: ' value_region') do
12+
it { should exist }
13+
its('state') { should cmp 'value_state' }
14+
its('end_time') { should cmp 'value_endtime' }
15+
its('update_time') { should cmp 'value_updatetime' }
16+
its('start_time') { should cmp 'value_starttime' }
17+
its('create_time') { should cmp 'value_createtime' }
18+
its('display_name') { should cmp 'value_displayname' }
19+
its('name') { should cmp 'value_name' }
20+
21+
end
22+
23+
describe google_vertex_ai_hyperparameter_tuning_job(name: "does_not_exit", region: ' value_region') do
24+
it { should_not exist }
25+
end
26+
```
27+
28+
## Properties
29+
Properties that can be accessed from the `google_vertex_ai_hyperparameter_tuning_job` resource:
30+
31+
32+
* `study_spec`: Required. Study configuration of the HyperparameterTuningJob.
33+
34+
* `trials`: Output only. Trials of the HyperparameterTuningJob.
35+
36+
* `state`: Output only. The detailed state of the job.
37+
Possible values:
38+
* JOB_STATE_UNSPECIFIED
39+
* JOB_STATE_QUEUED
40+
* JOB_STATE_PENDING
41+
* JOB_STATE_RUNNING
42+
* JOB_STATE_SUCCEEDED
43+
* JOB_STATE_FAILED
44+
* JOB_STATE_CANCELLING
45+
* JOB_STATE_CANCELLED
46+
* JOB_STATE_PAUSED
47+
* JOB_STATE_EXPIRED
48+
* JOB_STATE_UPDATING
49+
* JOB_STATE_PARTIALLY_SUCCEEDED
50+
51+
* `max_failed_trial_count`: The number of failed Trials that need to be seen before failing the HyperparameterTuningJob. If set to 0, Vertex AI decides how many Trials must fail before the whole job fails.
52+
53+
* `encryption_spec`: Customer-managed encryption key options for a HyperparameterTuningJob. If this is set, then all resources created by the HyperparameterTuningJob will be encrypted with the provided encryption key.
54+
55+
* `error`: Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.
56+
57+
* `end_time`: Output only. Time when the HyperparameterTuningJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
58+
59+
* `update_time`: Output only. Time when the HyperparameterTuningJob was most recently updated.
60+
61+
* `start_time`: Output only. Time when the HyperparameterTuningJob for the first time entered the `JOB_STATE_RUNNING` state.
62+
63+
* `labels`: The labels with user-defined metadata to organize HyperparameterTuningJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
64+
65+
* `additional_properties`:
66+
67+
* `create_time`: Output only. Time when the HyperparameterTuningJob was created.
68+
69+
* `parallel_trial_count`: Required. The desired number of Trials to run in parallel.
70+
71+
* `trial_job_spec`: Required. The spec of a trial job. The same spec applies to the CustomJobs created in all the trials.
72+
73+
* `max_trial_count`: Required. The desired total number of Trials.
74+
75+
* `display_name`: Required. The display name of the HyperparameterTuningJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
76+
77+
* `name`: Output only. Resource name of the HyperparameterTuningJob.
78+
79+
80+
## GCP Permissions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: About the google_vertex_ai_hyperparameter_tuning_jobs resource
3+
platform: gcp
4+
---
5+
6+
## Syntax
7+
A `google_vertex_ai_hyperparameter_tuning_jobs` is used to test a Google HyperparameterTuningJob resource
8+
9+
## Examples
10+
```
11+
describe google_vertex_ai_hyperparameter_tuning_jobs(parent: "projects/#{gcp_project_id}/locations/#{hyperparameter_tuning_job['region']}", region: ' value_region') do
12+
it { should exist }
13+
end
14+
```
15+
16+
## Properties
17+
Properties that can be accessed from the `google_vertex_ai_hyperparameter_tuning_jobs` resource:
18+
19+
See [google_vertex_ai_hyperparameter_tuning_job.md](google_vertex_ai_hyperparameter_tuning_job.md) for more detailed information
20+
* `study_specs`: an array of `google_vertex_ai_hyperparameter_tuning_job` study_spec
21+
* `trials`: an array of `google_vertex_ai_hyperparameter_tuning_job` trials
22+
* `states`: an array of `google_vertex_ai_hyperparameter_tuning_job` state
23+
* `max_failed_trial_counts`: an array of `google_vertex_ai_hyperparameter_tuning_job` max_failed_trial_count
24+
* `encryption_specs`: an array of `google_vertex_ai_hyperparameter_tuning_job` encryption_spec
25+
* `errors`: an array of `google_vertex_ai_hyperparameter_tuning_job` error
26+
* `end_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` end_time
27+
* `update_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` update_time
28+
* `start_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` start_time
29+
* `labels`: an array of `google_vertex_ai_hyperparameter_tuning_job` labels
30+
* `create_times`: an array of `google_vertex_ai_hyperparameter_tuning_job` create_time
31+
* `parallel_trial_counts`: an array of `google_vertex_ai_hyperparameter_tuning_job` parallel_trial_count
32+
* `trial_job_specs`: an array of `google_vertex_ai_hyperparameter_tuning_job` trial_job_spec
33+
* `max_trial_counts`: an array of `google_vertex_ai_hyperparameter_tuning_job` max_trial_count
34+
* `display_names`: an array of `google_vertex_ai_hyperparameter_tuning_job` display_name
35+
* `names`: an array of `google_vertex_ai_hyperparameter_tuning_job` name
36+
37+
## Filter Criteria
38+
This resource supports all of the above properties as filter criteria, which can be used
39+
with `where` as a block or a method.
40+
41+
## GCP Permissions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# frozen_string_literal: false
2+
3+
# ----------------------------------------------------------------------------
4+
#
5+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
6+
#
7+
# ----------------------------------------------------------------------------
8+
#
9+
# This file is automatically generated by Magic Modules and manual
10+
# changes will be clobbered when the file is regenerated.
11+
#
12+
# Please read more about how to change this file in README.md and
13+
# CONTRIBUTING.md located at the root of this package.
14+
#
15+
# ----------------------------------------------------------------------------
16+
module GoogleInSpec
17+
module VertexAI
18+
module Property
19+
class HyperparameterTuningJobLabels
20+
attr_reader :additional_properties
21+
22+
def initialize(args = nil, parent_identifier = nil)
23+
return if args.nil?
24+
@parent_identifier = parent_identifier
25+
@additional_properties = args['additionalProperties']
26+
end
27+
28+
def to_s
29+
"#{@parent_identifier} HyperparameterTuningJobLabels"
30+
end
31+
end
32+
end
33+
end
34+
end

0 commit comments

Comments
 (0)