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

Add resource google_storage_transfer_agent_pool #12945

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/6705.txt
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_storage_transfer_agent_pool`
```
8 changes: 4 additions & 4 deletions google/config.go
Expand Up @@ -242,6 +242,7 @@ type Config struct {
SpannerBasePath string
SQLBasePath string
StorageBasePath string
StorageTransferBasePath string
TagsBasePath string
TPUBasePath string
VertexAIBasePath string
Expand All @@ -257,7 +258,6 @@ type Config struct {
IAMBasePath string
CloudIoTBasePath string
ServiceNetworkingBasePath string
StorageTransferBasePath string
BigtableAdminBasePath string

// dcl
Expand Down Expand Up @@ -339,6 +339,7 @@ const SourceRepoBasePathKey = "SourceRepo"
const SpannerBasePathKey = "Spanner"
const SQLBasePathKey = "SQL"
const StorageBasePathKey = "Storage"
const StorageTransferBasePathKey = "StorageTransfer"
const TagsBasePathKey = "Tags"
const TPUBasePathKey = "TPU"
const VertexAIBasePathKey = "VertexAI"
Expand All @@ -352,7 +353,6 @@ const IAMBasePathKey = "IAM"
const IamCredentialsBasePathKey = "IamCredentials"
const ResourceManagerV3BasePathKey = "ResourceManagerV3"
const ServiceNetworkingBasePathKey = "ServiceNetworking"
const StorageTransferBasePathKey = "StorageTransfer"
const BigtableAdminBasePathKey = "BigtableAdmin"
const ContainerAwsBasePathKey = "ContainerAws"
const ContainerAzureBasePathKey = "ContainerAzure"
Expand Down Expand Up @@ -430,6 +430,7 @@ var DefaultBasePaths = map[string]string{
SpannerBasePathKey: "https://spanner.googleapis.com/v1/",
SQLBasePathKey: "https://sqladmin.googleapis.com/sql/v1beta4/",
StorageBasePathKey: "https://storage.googleapis.com/storage/v1/",
StorageTransferBasePathKey: "https://storagetransfer.googleapis.com/v1/",
TagsBasePathKey: "https://cloudresourcemanager.googleapis.com/v3/",
TPUBasePathKey: "https://tpu.googleapis.com/v1/",
VertexAIBasePathKey: "https://{{region}}-aiplatform.googleapis.com/v1/",
Expand All @@ -443,7 +444,6 @@ var DefaultBasePaths = map[string]string{
IamCredentialsBasePathKey: "https://iamcredentials.googleapis.com/v1/",
ResourceManagerV3BasePathKey: "https://cloudresourcemanager.googleapis.com/v3/",
ServiceNetworkingBasePathKey: "https://servicenetworking.googleapis.com/v1/",
StorageTransferBasePathKey: "https://storagetransfer.googleapis.com/v1/",
BigtableAdminBasePathKey: "https://bigtableadmin.googleapis.com/v2/",
ContainerAwsBasePathKey: "https://{{location}}-gkemulticloud.googleapis.com/v1/",
ContainerAzureBasePathKey: "https://{{location}}-gkemulticloud.googleapis.com/v1/",
Expand Down Expand Up @@ -1283,6 +1283,7 @@ func ConfigureBasePaths(c *Config) {
c.SpannerBasePath = DefaultBasePaths[SpannerBasePathKey]
c.SQLBasePath = DefaultBasePaths[SQLBasePathKey]
c.StorageBasePath = DefaultBasePaths[StorageBasePathKey]
c.StorageTransferBasePath = DefaultBasePaths[StorageTransferBasePathKey]
c.TagsBasePath = DefaultBasePaths[TagsBasePathKey]
c.TPUBasePath = DefaultBasePaths[TPUBasePathKey]
c.VertexAIBasePath = DefaultBasePaths[VertexAIBasePathKey]
Expand All @@ -1300,6 +1301,5 @@ func ConfigureBasePaths(c *Config) {
c.IAMBasePath = DefaultBasePaths[IAMBasePathKey]
c.ServiceNetworkingBasePath = DefaultBasePaths[ServiceNetworkingBasePathKey]
c.BigQueryBasePath = DefaultBasePaths[BigQueryBasePathKey]
c.StorageTransferBasePath = DefaultBasePaths[StorageTransferBasePathKey]
c.BigtableAdminBasePath = DefaultBasePaths[BigtableAdminBasePathKey]
}
16 changes: 12 additions & 4 deletions google/provider.go
Expand Up @@ -717,6 +717,14 @@ func Provider() *schema.Provider {
"GOOGLE_STORAGE_CUSTOM_ENDPOINT",
}, DefaultBasePaths[StorageBasePathKey]),
},
"storage_transfer_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_STORAGE_TRANSFER_CUSTOM_ENDPOINT",
}, DefaultBasePaths[StorageTransferBasePathKey]),
},
"tags_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -768,7 +776,6 @@ func Provider() *schema.Provider {
IAMCustomEndpointEntryKey: IAMCustomEndpointEntry,
ServiceNetworkingCustomEndpointEntryKey: ServiceNetworkingCustomEndpointEntry,
ServiceUsageCustomEndpointEntryKey: ServiceUsageCustomEndpointEntry,
StorageTransferCustomEndpointEntryKey: StorageTransferCustomEndpointEntry,
BigtableAdminCustomEndpointEntryKey: BigtableAdminCustomEndpointEntry,

// dcl
Expand Down Expand Up @@ -910,9 +917,9 @@ func Provider() *schema.Provider {
return provider
}

// Generated resources: 244
// Generated resources: 245
// Generated IAM resources: 150
// Total generated resources: 394
// Total generated resources: 395
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand Down Expand Up @@ -1286,6 +1293,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_storage_object_access_control": resourceStorageObjectAccessControl(),
"google_storage_default_object_access_control": resourceStorageDefaultObjectAccessControl(),
"google_storage_hmac_key": resourceStorageHmacKey(),
"google_storage_transfer_agent_pool": resourceStorageTransferAgentPool(),
"google_tags_tag_key": resourceTagsTagKey(),
"google_tags_tag_key_iam_binding": ResourceIamBinding(TagsTagKeyIamSchema, TagsTagKeyIamUpdaterProducer, TagsTagKeyIdParseFunc),
"google_tags_tag_key_iam_member": ResourceIamMember(TagsTagKeyIamSchema, TagsTagKeyIamUpdaterProducer, TagsTagKeyIdParseFunc),
Expand Down Expand Up @@ -1597,6 +1605,7 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.SpannerBasePath = d.Get("spanner_custom_endpoint").(string)
config.SQLBasePath = d.Get("sql_custom_endpoint").(string)
config.StorageBasePath = d.Get("storage_custom_endpoint").(string)
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.VertexAIBasePath = d.Get("vertex_ai_custom_endpoint").(string)
Expand All @@ -1613,7 +1622,6 @@ func providerConfigure(ctx context.Context, d *schema.ResourceData, p *schema.Pr
config.IAMBasePath = d.Get(IAMCustomEndpointEntryKey).(string)
config.ServiceNetworkingBasePath = d.Get(ServiceNetworkingCustomEndpointEntryKey).(string)
config.ServiceUsageBasePath = d.Get(ServiceUsageCustomEndpointEntryKey).(string)
config.StorageTransferBasePath = d.Get(StorageTransferCustomEndpointEntryKey).(string)
config.BigtableAdminBasePath = d.Get(BigtableAdminCustomEndpointEntryKey).(string)

// dcl
Expand Down
10 changes: 0 additions & 10 deletions google/provider_handwritten_endpoint.go
Expand Up @@ -98,16 +98,6 @@ var ServiceUsageCustomEndpointEntry = &schema.Schema{
}, DefaultBasePaths[ServiceUsageBasePathKey]),
}

var StorageTransferCustomEndpointEntryKey = "storage_transfer_custom_endpoint"
var StorageTransferCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_STORAGE_TRANSFER_CUSTOM_ENDPOINT",
}, DefaultBasePaths[StorageTransferBasePathKey]),
}

var BigtableAdminCustomEndpointEntryKey = "bigtable_custom_endpoint"
var BigtableAdminCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Expand Down