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

Dataproc workflow template #8962

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/4693.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
google_dataproc_workflow_template
```
3 changes: 3 additions & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"google.golang.org/api/option"

dcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
dataprocDcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/dataproc"
eventarcDcl "github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/eventarc"
"golang.org/x/oauth2"
googleoauth "golang.org/x/oauth2/google"
Expand Down Expand Up @@ -163,6 +164,7 @@ type Config struct {

// start DCL clients
dclConfig *dcl.Config
clientDataprocDCL *dataprocDcl.Client
clientEventarcDCL *eventarcDcl.Client
}

Expand Down Expand Up @@ -284,6 +286,7 @@ func (c *Config) LoadAndValidate(ctx context.Context) error {
// Start DCL client instantiation
// TODO(slevenick): handle user agents
c.dclConfig = dcl.NewConfig(dcl.WithHTTPClient(client), dcl.WithUserAgent(c.userAgent), dcl.WithLogger(dclLogger{}))
c.clientDataprocDCL = dataprocDcl.NewClient(c.dclConfig)
c.clientEventarcDCL = eventarcDcl.NewClient(c.dclConfig)

return nil
Expand Down
17 changes: 17 additions & 0 deletions google/expanders.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package google

import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

func expandStringArray(v interface{}) []string {
arr, ok := v.([]string)

if ok {
return arr
}

if arr, ok := v.(*schema.Set); ok {
return convertStringSet(arr)
}

return convertStringArr(v.([]interface{}))
}
1 change: 1 addition & 0 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_dataflow_job": resourceDataflowJob(),
"google_dataproc_cluster": resourceDataprocCluster(),
"google_dataproc_job": resourceDataprocJob(),
"google_dataproc_workflow_template": resourceDataprocWorkflowTemplate(),
"google_endpoints_service": resourceEndpointsService(),
"google_eventarc_trigger": resourceEventarcTrigger(),
"google_folder": resourceGoogleFolder(),
Expand Down
Loading