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

feat: add the new resource: google_dataflow_pipeline #15785

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/7325.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_data_pipeline_pipeline`
```
5 changes: 5 additions & 0 deletions .teamcity/components/generated/services.kt
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ var services = mapOf(
"displayName" to "Datalossprevention",
"path" to "./google/services/datalossprevention"
),
"datapipeline" to mapOf(
"name" to "datapipeline",
"displayName" to "Datapipeline",
"path" to "./google/services/datapipeline"
),
"dataplex" to mapOf(
"name" to "dataplex",
"displayName" to "Dataplex",
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 @@ -63,6 +63,7 @@ type ProviderModel struct {
DataCatalogCustomEndpoint types.String `tfsdk:"data_catalog_custom_endpoint"`
DataFusionCustomEndpoint types.String `tfsdk:"data_fusion_custom_endpoint"`
DataLossPreventionCustomEndpoint types.String `tfsdk:"data_loss_prevention_custom_endpoint"`
DataPipelineCustomEndpoint types.String `tfsdk:"data_pipeline_custom_endpoint"`
DataplexCustomEndpoint types.String `tfsdk:"dataplex_custom_endpoint"`
DataprocCustomEndpoint types.String `tfsdk:"dataproc_custom_endpoint"`
DataprocMetastoreCustomEndpoint types.String `tfsdk:"dataproc_metastore_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 @@ -347,6 +347,12 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest,
transport_tpg.CustomEndpointValidator(),
},
},
"data_pipeline_custom_endpoint": &schema.StringAttribute{
Optional: true,
Validators: []validator.String{
transport_tpg.CustomEndpointValidator(),
},
},
"dataplex_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 @@ -87,6 +87,7 @@ type FrameworkProviderConfig struct {
DataCatalogBasePath string
DataFusionBasePath string
DataLossPreventionBasePath string
DataPipelineBasePath string
DataplexBasePath string
DataprocBasePath string
DataprocMetastoreBasePath string
Expand Down Expand Up @@ -226,6 +227,7 @@ func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context,
p.DataCatalogBasePath = data.DataCatalogCustomEndpoint.ValueString()
p.DataFusionBasePath = data.DataFusionCustomEndpoint.ValueString()
p.DataLossPreventionBasePath = data.DataLossPreventionCustomEndpoint.ValueString()
p.DataPipelineBasePath = data.DataPipelineCustomEndpoint.ValueString()
p.DataplexBasePath = data.DataplexCustomEndpoint.ValueString()
p.DataprocBasePath = data.DataprocCustomEndpoint.ValueString()
p.DataprocMetastoreBasePath = data.DataprocMetastoreCustomEndpoint.ValueString()
Expand Down Expand Up @@ -719,6 +721,14 @@ func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmo
data.DataLossPreventionCustomEndpoint = types.StringValue(customEndpoint.(string))
}
}
if data.DataPipelineCustomEndpoint.IsNull() {
customEndpoint := transport_tpg.MultiEnvDefault([]string{
"GOOGLE_DATA_PIPELINE_CUSTOM_ENDPOINT",
}, transport_tpg.DefaultBasePaths[transport_tpg.DataPipelineBasePathKey])
if customEndpoint != nil {
data.DataPipelineCustomEndpoint = types.StringValue(customEndpoint.(string))
}
}
if data.DataplexCustomEndpoint.IsNull() {
customEndpoint := transport_tpg.MultiEnvDefault([]string{
"GOOGLE_DATAPLEX_CUSTOM_ENDPOINT",
Expand Down
12 changes: 10 additions & 2 deletions google/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import (
"github.com/hashicorp/terraform-provider-google/google/services/datacatalog"
"github.com/hashicorp/terraform-provider-google/google/services/datafusion"
"github.com/hashicorp/terraform-provider-google/google/services/datalossprevention"
"github.com/hashicorp/terraform-provider-google/google/services/datapipeline"
"github.com/hashicorp/terraform-provider-google/google/services/dataplex"
"github.com/hashicorp/terraform-provider-google/google/services/dataproc"
"github.com/hashicorp/terraform-provider-google/google/services/dataprocmetastore"
Expand Down Expand Up @@ -417,6 +418,11 @@ func Provider() *schema.Provider {
Optional: true,
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
},
"data_pipeline_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: transport_tpg.ValidateCustomEndpoint,
},
"dataplex_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -974,9 +980,9 @@ func DatasourceMapWithErrors() (map[string]*schema.Resource, error) {
})
}

// Generated resources: 318
// Generated resources: 319
// Generated IAM resources: 207
// Total generated resources: 525
// Total generated resources: 526
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -1244,6 +1250,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_data_loss_prevention_inspect_template": datalossprevention.ResourceDataLossPreventionInspectTemplate(),
"google_data_loss_prevention_job_trigger": datalossprevention.ResourceDataLossPreventionJobTrigger(),
"google_data_loss_prevention_stored_info_type": datalossprevention.ResourceDataLossPreventionStoredInfoType(),
"google_data_pipeline_pipeline": datapipeline.ResourceDataPipelinePipeline(),
"google_dataplex_asset_iam_binding": tpgiamresource.ResourceIamBinding(dataplex.DataplexAssetIamSchema, dataplex.DataplexAssetIamUpdaterProducer, dataplex.DataplexAssetIdParseFunc),
"google_dataplex_asset_iam_member": tpgiamresource.ResourceIamMember(dataplex.DataplexAssetIamSchema, dataplex.DataplexAssetIamUpdaterProducer, dataplex.DataplexAssetIdParseFunc),
"google_dataplex_asset_iam_policy": tpgiamresource.ResourceIamPolicy(dataplex.DataplexAssetIamSchema, dataplex.DataplexAssetIamUpdaterProducer, dataplex.DataplexAssetIdParseFunc),
Expand Down Expand Up @@ -1774,6 +1781,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.DataCatalogBasePath = d.Get("data_catalog_custom_endpoint").(string)
config.DataFusionBasePath = d.Get("data_fusion_custom_endpoint").(string)
config.DataLossPreventionBasePath = d.Get("data_loss_prevention_custom_endpoint").(string)
config.DataPipelineBasePath = d.Get("data_pipeline_custom_endpoint").(string)
config.DataplexBasePath = d.Get("dataplex_custom_endpoint").(string)
config.DataprocBasePath = d.Get("dataproc_custom_endpoint").(string)
config.DataprocMetastoreBasePath = d.Get("dataproc_metastore_custom_endpoint").(string)
Expand Down
Loading