Skip to content

Commit

Permalink
Add Google Transcoder API (#10932) (#19854)
Browse files Browse the repository at this point in the history
[upstream:c95102737c7c4909dfac79f26d582c42e97a1a8b]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 15, 2024
1 parent fa2da58 commit e8f2586
Show file tree
Hide file tree
Showing 20 changed files with 9,745 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changelog/10932.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:new-resource
`google_transcoder_job`
```
```release-note:new-resource
`google_transcoder_job_template`
```
5 changes: 5 additions & 0 deletions .teamcity/components/inputs/services_beta.kt
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ var ServicesListBeta = mapOf(
"name" to "tpuv2",
"displayName" to "Tpuv2",
"path" to "./google-beta/services/tpuv2"
),
"transcoder" to mapOf(
"name" to "transcoder",
"displayName" to "Transcoder",
"path" to "./google-beta/services/transcoder"
),
"vertexai" to mapOf(
"name" to "vertexai",
Expand Down
5 changes: 5 additions & 0 deletions .teamcity/components/inputs/services_ga.kt
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,11 @@ var ServicesListGa = mapOf(
"displayName" to "Tpuv2",
"path" to "./google/services/tpuv2"
),
"transcoder" to mapOf(
"name" to "transcoder",
"displayName" to "Transcoder",
"path" to "./google/services/transcoder"
),
"vertexai" to mapOf(
"name" to "vertexai",
"displayName" to "Vertexai",
Expand Down
1 change: 1 addition & 0 deletions google/fwmodels/provider_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ type ProviderModel struct {
StorageTransferCustomEndpoint types.String `tfsdk:"storage_transfer_custom_endpoint"`
TagsCustomEndpoint types.String `tfsdk:"tags_custom_endpoint"`
TPUCustomEndpoint types.String `tfsdk:"tpu_custom_endpoint"`
TranscoderCustomEndpoint types.String `tfsdk:"transcoder_custom_endpoint"`
VertexAICustomEndpoint types.String `tfsdk:"vertex_ai_custom_endpoint"`
VmwareengineCustomEndpoint types.String `tfsdk:"vmwareengine_custom_endpoint"`
VPCAccessCustomEndpoint types.String `tfsdk:"vpc_access_custom_endpoint"`
Expand Down
6 changes: 6 additions & 0 deletions google/fwprovider/framework_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest,
transport_tpg.CustomEndpointValidator(),
},
},
"transcoder_custom_endpoint": &schema.StringAttribute{
Optional: true,
Validators: []validator.String{
transport_tpg.CustomEndpointValidator(),
},
},
"vertex_ai_custom_endpoint": &schema.StringAttribute{
Optional: true,
Validators: []validator.String{
Expand Down
10 changes: 10 additions & 0 deletions google/fwtransport/framework_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ type FrameworkProviderConfig struct {
StorageTransferBasePath string
TagsBasePath string
TPUBasePath string
TranscoderBasePath string
VertexAIBasePath string
VmwareengineBasePath string
VPCAccessBasePath string
Expand Down Expand Up @@ -341,6 +342,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context,
p.StorageTransferBasePath = data.StorageTransferCustomEndpoint.ValueString()
p.TagsBasePath = data.TagsCustomEndpoint.ValueString()
p.TPUBasePath = data.TPUCustomEndpoint.ValueString()
p.TranscoderBasePath = data.TranscoderCustomEndpoint.ValueString()
p.VertexAIBasePath = data.VertexAICustomEndpoint.ValueString()
p.VmwareengineBasePath = data.VmwareengineCustomEndpoint.ValueString()
p.VPCAccessBasePath = data.VPCAccessCustomEndpoint.ValueString()
Expand Down Expand Up @@ -1421,6 +1423,14 @@ func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmo
data.TPUCustomEndpoint = types.StringValue(customEndpoint.(string))
}
}
if data.TranscoderCustomEndpoint.IsNull() {
customEndpoint := transport_tpg.MultiEnvDefault([]string{
"GOOGLE_TRANSCODER_CUSTOM_ENDPOINT",
}, transport_tpg.DefaultBasePaths[transport_tpg.TranscoderBasePathKey])
if customEndpoint != nil {
data.TranscoderCustomEndpoint = types.StringValue(customEndpoint.(string))
}
}
if data.VertexAICustomEndpoint.IsNull() {
customEndpoint := transport_tpg.MultiEnvDefault([]string{
"GOOGLE_VERTEX_AI_CUSTOM_ENDPOINT",
Expand Down
6 changes: 6 additions & 0 deletions google/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ func Provider() *schema.Provider {
Optional: true,
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
},
"transcoder_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
},
"vertex_ai_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -1063,6 +1068,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.StorageTransferBasePath = d.Get("storage_transfer_custom_endpoint").(string)
config.TagsBasePath = d.Get("tags_custom_endpoint").(string)
config.TPUBasePath = d.Get("tpu_custom_endpoint").(string)
config.TranscoderBasePath = d.Get("transcoder_custom_endpoint").(string)
config.VertexAIBasePath = d.Get("vertex_ai_custom_endpoint").(string)
config.VmwareengineBasePath = d.Get("vmwareengine_custom_endpoint").(string)
config.VPCAccessBasePath = d.Get("vpc_access_custom_endpoint").(string)
Expand Down
7 changes: 5 additions & 2 deletions google/provider/provider_mmv1_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ import (
"github.com/hashicorp/terraform-provider-google/google/services/storagetransfer"
"github.com/hashicorp/terraform-provider-google/google/services/tags"
"github.com/hashicorp/terraform-provider-google/google/services/tpu"
"github.com/hashicorp/terraform-provider-google/google/services/transcoder"
"github.com/hashicorp/terraform-provider-google/google/services/vertexai"
"github.com/hashicorp/terraform-provider-google/google/services/vmwareengine"
"github.com/hashicorp/terraform-provider-google/google/services/vpcaccess"
Expand Down Expand Up @@ -439,9 +440,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{
}

// Resources
// Generated resources: 471
// Generated resources: 473
// Generated IAM resources: 261
// Total generated resources: 732
// Total generated resources: 734
var generatedResources = map[string]*schema.Resource{
"google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(),
"google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(),
Expand Down Expand Up @@ -1129,6 +1130,8 @@ var generatedResources = map[string]*schema.Resource{
"google_tags_tag_value_iam_member": tpgiamresource.ResourceIamMember(tags.TagsTagValueIamSchema, tags.TagsTagValueIamUpdaterProducer, tags.TagsTagValueIdParseFunc),
"google_tags_tag_value_iam_policy": tpgiamresource.ResourceIamPolicy(tags.TagsTagValueIamSchema, tags.TagsTagValueIamUpdaterProducer, tags.TagsTagValueIdParseFunc),
"google_tpu_node": tpu.ResourceTPUNode(),
"google_transcoder_job": transcoder.ResourceTranscoderJob(),
"google_transcoder_job_template": transcoder.ResourceTranscoderJobTemplate(),
"google_vertex_ai_dataset": vertexai.ResourceVertexAIDataset(),
"google_vertex_ai_deployment_resource_pool": vertexai.ResourceVertexAIDeploymentResourcePool(),
"google_vertex_ai_endpoint": vertexai.ResourceVertexAIEndpoint(),
Expand Down
Loading

0 comments on commit e8f2586

Please sign in to comment.