Skip to content

Commit f1716db

Browse files
Add Google Transcoder API (#10932) (#8406)
[upstream:c95102737c7c4909dfac79f26d582c42e97a1a8b] Signed-off-by: Modular Magician <[email protected]>
1 parent 00e0ab8 commit f1716db

18 files changed

+9946
-2
lines changed

Diff for: .changelog/10932.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```release-note:new-resource
2+
`google_transcoder_job`
3+
```
4+
```release-note:new-resource
5+
`google_transcoder_job_template`
6+
```

Diff for: google-beta/fwmodels/provider_model.go

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ type ProviderModel struct {
161161
TagsCustomEndpoint types.String `tfsdk:"tags_custom_endpoint"`
162162
TPUCustomEndpoint types.String `tfsdk:"tpu_custom_endpoint"`
163163
TpuV2CustomEndpoint types.String `tfsdk:"tpu_v2_custom_endpoint"`
164+
TranscoderCustomEndpoint types.String `tfsdk:"transcoder_custom_endpoint"`
164165
VertexAICustomEndpoint types.String `tfsdk:"vertex_ai_custom_endpoint"`
165166
VmwareengineCustomEndpoint types.String `tfsdk:"vmwareengine_custom_endpoint"`
166167
VPCAccessCustomEndpoint types.String `tfsdk:"vpc_access_custom_endpoint"`

Diff for: google-beta/fwprovider/framework_provider.go

+6
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest,
944944
transport_tpg.CustomEndpointValidator(),
945945
},
946946
},
947+
"transcoder_custom_endpoint": &schema.StringAttribute{
948+
Optional: true,
949+
Validators: []validator.String{
950+
transport_tpg.CustomEndpointValidator(),
951+
},
952+
},
947953
"vertex_ai_custom_endpoint": &schema.StringAttribute{
948954
Optional: true,
949955
Validators: []validator.String{

Diff for: google-beta/fwtransport/framework_config.go

+10
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ type FrameworkProviderConfig struct {
196196
TagsBasePath string
197197
TPUBasePath string
198198
TpuV2BasePath string
199+
TranscoderBasePath string
199200
VertexAIBasePath string
200201
VmwareengineBasePath string
201202
VPCAccessBasePath string
@@ -374,6 +375,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context,
374375
p.TagsBasePath = data.TagsCustomEndpoint.ValueString()
375376
p.TPUBasePath = data.TPUCustomEndpoint.ValueString()
376377
p.TpuV2BasePath = data.TpuV2CustomEndpoint.ValueString()
378+
p.TranscoderBasePath = data.TranscoderCustomEndpoint.ValueString()
377379
p.VertexAIBasePath = data.VertexAICustomEndpoint.ValueString()
378380
p.VmwareengineBasePath = data.VmwareengineCustomEndpoint.ValueString()
379381
p.VPCAccessBasePath = data.VPCAccessCustomEndpoint.ValueString()
@@ -1583,6 +1585,14 @@ func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmo
15831585
data.TpuV2CustomEndpoint = types.StringValue(customEndpoint.(string))
15841586
}
15851587
}
1588+
if data.TranscoderCustomEndpoint.IsNull() {
1589+
customEndpoint := transport_tpg.MultiEnvDefault([]string{
1590+
"GOOGLE_TRANSCODER_CUSTOM_ENDPOINT",
1591+
}, transport_tpg.DefaultBasePaths[transport_tpg.TranscoderBasePathKey])
1592+
if customEndpoint != nil {
1593+
data.TranscoderCustomEndpoint = types.StringValue(customEndpoint.(string))
1594+
}
1595+
}
15861596
if data.VertexAICustomEndpoint.IsNull() {
15871597
customEndpoint := transport_tpg.MultiEnvDefault([]string{
15881598
"GOOGLE_VERTEX_AI_CUSTOM_ENDPOINT",

Diff for: google-beta/provider/provider.go

+6
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,11 @@ func Provider() *schema.Provider {
810810
Optional: true,
811811
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
812812
},
813+
"transcoder_custom_endpoint": {
814+
Type: schema.TypeString,
815+
Optional: true,
816+
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
817+
},
813818
"vertex_ai_custom_endpoint": {
814819
Type: schema.TypeString,
815820
Optional: true,
@@ -1165,6 +1170,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
11651170
config.TagsBasePath = d.Get("tags_custom_endpoint").(string)
11661171
config.TPUBasePath = d.Get("tpu_custom_endpoint").(string)
11671172
config.TpuV2BasePath = d.Get("tpu_v2_custom_endpoint").(string)
1173+
config.TranscoderBasePath = d.Get("transcoder_custom_endpoint").(string)
11681174
config.VertexAIBasePath = d.Get("vertex_ai_custom_endpoint").(string)
11691175
config.VmwareengineBasePath = d.Get("vmwareengine_custom_endpoint").(string)
11701176
config.VPCAccessBasePath = d.Get("vpc_access_custom_endpoint").(string)

Diff for: google-beta/provider/provider_mmv1_resources.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ import (
137137
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/tags"
138138
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/tpu"
139139
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/tpuv2"
140+
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/transcoder"
140141
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/vertexai"
141142
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/vmwareengine"
142143
"github.com/hashicorp/terraform-provider-google-beta/google-beta/services/vpcaccess"
@@ -488,9 +489,9 @@ var handwrittenIAMDatasources = map[string]*schema.Resource{
488489
}
489490

490491
// Resources
491-
// Generated resources: 534
492+
// Generated resources: 536
492493
// Generated IAM resources: 291
493-
// Total generated resources: 825
494+
// Total generated resources: 827
494495
var generatedResources = map[string]*schema.Resource{
495496
"google_folder_access_approval_settings": accessapproval.ResourceAccessApprovalFolderSettings(),
496497
"google_organization_access_approval_settings": accessapproval.ResourceAccessApprovalOrganizationSettings(),
@@ -1270,6 +1271,8 @@ var generatedResources = map[string]*schema.Resource{
12701271
"google_tags_tag_value_iam_policy": tpgiamresource.ResourceIamPolicy(tags.TagsTagValueIamSchema, tags.TagsTagValueIamUpdaterProducer, tags.TagsTagValueIdParseFunc),
12711272
"google_tpu_node": tpu.ResourceTPUNode(),
12721273
"google_tpu_v2_vm": tpuv2.ResourceTpuV2Vm(),
1274+
"google_transcoder_job": transcoder.ResourceTranscoderJob(),
1275+
"google_transcoder_job_template": transcoder.ResourceTranscoderJobTemplate(),
12731276
"google_vertex_ai_dataset": vertexai.ResourceVertexAIDataset(),
12741277
"google_vertex_ai_deployment_resource_pool": vertexai.ResourceVertexAIDeploymentResourcePool(),
12751278
"google_vertex_ai_endpoint": vertexai.ResourceVertexAIEndpoint(),

0 commit comments

Comments
 (0)