Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vertex AI Dataset #9411

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/4863.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_vertex_ai_dataset`
```
4 changes: 4 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ type Config struct {
StorageBasePath string
TagsBasePath string
TPUBasePath string
VertexAIBasePath string
VPCAccessBasePath string
WorkflowsBasePath string

Expand Down Expand Up @@ -225,6 +226,7 @@ const SQLBasePathKey = "SQL"
const StorageBasePathKey = "Storage"
const TagsBasePathKey = "Tags"
const TPUBasePathKey = "TPU"
const VertexAIBasePathKey = "VertexAI"
const VPCAccessBasePathKey = "VPCAccess"
const WorkflowsBasePathKey = "Workflows"
const CloudBillingBasePathKey = "CloudBilling"
Expand Down Expand Up @@ -303,6 +305,7 @@ var DefaultBasePaths = map[string]string{
StorageBasePathKey: "https://storage.googleapis.com/storage/v1/",
TagsBasePathKey: "https://cloudresourcemanager.googleapis.com/v3/",
TPUBasePathKey: "https://tpu.googleapis.com/v1/",
VertexAIBasePathKey: "https://{{region}}-aiplatform.googleapis.com/v1/",
VPCAccessBasePathKey: "https://vpcaccess.googleapis.com/v1/",
WorkflowsBasePathKey: "https://workflows.googleapis.com/v1/",
CloudBillingBasePathKey: "https://cloudbilling.googleapis.com/v1/",
Expand Down Expand Up @@ -1134,6 +1137,7 @@ func ConfigureBasePaths(c *Config) {
c.StorageBasePath = DefaultBasePaths[StorageBasePathKey]
c.TagsBasePath = DefaultBasePaths[TagsBasePathKey]
c.TPUBasePath = DefaultBasePaths[TPUBasePathKey]
c.VertexAIBasePath = DefaultBasePaths[VertexAIBasePathKey]
c.VPCAccessBasePath = DefaultBasePaths[VPCAccessBasePathKey]
c.WorkflowsBasePath = DefaultBasePaths[WorkflowsBasePathKey]

Expand Down
14 changes: 12 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,14 @@ func Provider() *schema.Provider {
"GOOGLE_TPU_CUSTOM_ENDPOINT",
}, DefaultBasePaths[TPUBasePathKey]),
},
"vertex_ai_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_VERTEX_AI_CUSTOM_ENDPOINT",
}, DefaultBasePaths[VertexAIBasePathKey]),
},
"vpc_access_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -758,9 +766,9 @@ func Provider() *schema.Provider {
return provider
}

// Generated resources: 196
// Generated resources: 197
// Generated IAM resources: 87
// Total generated resources: 283
// Total generated resources: 284
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -1050,6 +1058,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_tags_tag_value_iam_policy": ResourceIamPolicy(TagsTagValueIamSchema, TagsTagValueIamUpdaterProducer, TagsTagValueIdParseFunc),
"google_tags_tag_binding": resourceTagsTagBinding(),
"google_tpu_node": resourceTPUNode(),
"google_vertex_ai_dataset": resourceVertexAIDataset(),
"google_vpc_access_connector": resourceVPCAccessConnector(),
"google_workflows_workflow": resourceWorkflowsWorkflow(),
},
Expand Down Expand Up @@ -1318,6 +1327,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.StorageBasePath = d.Get("storage_custom_endpoint").(string)
config.TagsBasePath = d.Get("tags_custom_endpoint").(string)
config.TPUBasePath = d.Get("tpu_custom_endpoint").(string)
config.VertexAIBasePath = d.Get("vertex_ai_custom_endpoint").(string)
config.VPCAccessBasePath = d.Get("vpc_access_custom_endpoint").(string)
config.WorkflowsBasePath = d.Get("workflows_custom_endpoint").(string)

Expand Down
Loading