Skip to content

Commit 8ea87b0

Browse files
Ty Larrabeemodular-magician
Ty Larrabee
authored andcommitted
Add transfer configs
Signed-off-by: Modular Magician <[email protected]>
1 parent 9135d39 commit 8ea87b0

7 files changed

+751
-0
lines changed

google/config.go

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ type Config struct {
7070

7171
AccessContextManagerBasePath string
7272
AppEngineBasePath string
73+
BigqueryDataTransferBasePath string
7374
BinaryAuthorizationBasePath string
7475
CloudBuildBasePath string
7576
CloudSchedulerBasePath string

google/provider.go

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ func Provider() terraform.ResourceProvider {
100100
// Generated Products
101101
AccessContextManagerCustomEndpointEntryKey: AccessContextManagerCustomEndpointEntry,
102102
AppEngineCustomEndpointEntryKey: AppEngineCustomEndpointEntry,
103+
BigqueryDataTransferCustomEndpointEntryKey: BigqueryDataTransferCustomEndpointEntry,
103104
BinaryAuthorizationCustomEndpointEntryKey: BinaryAuthorizationCustomEndpointEntry,
104105
CloudBuildCustomEndpointEntryKey: CloudBuildCustomEndpointEntry,
105106
CloudSchedulerCustomEndpointEntryKey: CloudSchedulerCustomEndpointEntry,
@@ -211,6 +212,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
211212
return mergeResourceMaps(
212213
GeneratedAccessContextManagerResourcesMap,
213214
GeneratedAppEngineResourcesMap,
215+
GeneratedBigqueryDataTransferResourcesMap,
214216
GeneratedBinaryAuthorizationResourcesMap,
215217
GeneratedCloudBuildResourcesMap,
216218
GeneratedCloudSchedulerResourcesMap,
@@ -382,6 +384,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
382384
// Generated products
383385
config.AccessContextManagerBasePath = d.Get(AccessContextManagerCustomEndpointEntryKey).(string)
384386
config.AppEngineBasePath = d.Get(AppEngineCustomEndpointEntryKey).(string)
387+
config.BigqueryDataTransferBasePath = d.Get(BigqueryDataTransferCustomEndpointEntryKey).(string)
385388
config.BinaryAuthorizationBasePath = d.Get(BinaryAuthorizationCustomEndpointEntryKey).(string)
386389
config.CloudBuildBasePath = d.Get(CloudBuildCustomEndpointEntryKey).(string)
387390
config.CloudSchedulerBasePath = d.Get(CloudSchedulerCustomEndpointEntryKey).(string)
@@ -439,6 +442,7 @@ func ConfigureBasePaths(c *Config) {
439442
// Generated Products
440443
c.AccessContextManagerBasePath = AccessContextManagerDefaultBasePath
441444
c.AppEngineBasePath = AppEngineDefaultBasePath
445+
c.BigqueryDataTransferBasePath = BigqueryDataTransferDefaultBasePath
442446
c.BinaryAuthorizationBasePath = BinaryAuthorizationDefaultBasePath
443447
c.CloudBuildBasePath = CloudBuildDefaultBasePath
444448
c.CloudSchedulerBasePath = CloudSchedulerDefaultBasePath
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// ----------------------------------------------------------------------------
2+
//
3+
// *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
4+
//
5+
// ----------------------------------------------------------------------------
6+
//
7+
// This file is automatically generated by Magic Modules and manual
8+
// changes will be clobbered when the file is regenerated.
9+
//
10+
// Please read more about how to change this file in
11+
// .github/CONTRIBUTING.md.
12+
//
13+
// ----------------------------------------------------------------------------
14+
15+
package google
16+
17+
import "github.com/hashicorp/terraform/helper/schema"
18+
19+
// If the base path has changed as a result of your PR, make sure to update
20+
// the provider_reference page!
21+
var BigqueryDataTransferDefaultBasePath = "https://bigquerydatatransfer.googleapis.com/v1/"
22+
var BigqueryDataTransferCustomEndpointEntryKey = "bigquery_data_transfer_custom_endpoint"
23+
var BigqueryDataTransferCustomEndpointEntry = &schema.Schema{
24+
Type: schema.TypeString,
25+
Optional: true,
26+
ValidateFunc: validateCustomEndpoint,
27+
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
28+
"GOOGLE_BIGQUERY_DATA_TRANSFER_CUSTOM_ENDPOINT",
29+
}, BigqueryDataTransferDefaultBasePath),
30+
}
31+
32+
var GeneratedBigqueryDataTransferResourcesMap = map[string]*schema.Resource{
33+
"google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(),
34+
}

0 commit comments

Comments
 (0)