Skip to content

Commit

Permalink
Add bigtable app profile resource
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
megan07 authored and modular-magician committed Aug 15, 2019
1 parent cb1d66c commit 3851cae
Show file tree
Hide file tree
Showing 7 changed files with 802 additions and 0 deletions.
1 change: 1 addition & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type Config struct {
AccessContextManagerBasePath string
AppEngineBasePath string
BigqueryDataTransferBasePath string
BigtableBasePath string
BinaryAuthorizationBasePath string
CloudBuildBasePath string
CloudSchedulerBasePath string
Expand Down
4 changes: 4 additions & 0 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func Provider() terraform.ResourceProvider {
AccessContextManagerCustomEndpointEntryKey: AccessContextManagerCustomEndpointEntry,
AppEngineCustomEndpointEntryKey: AppEngineCustomEndpointEntry,
BigqueryDataTransferCustomEndpointEntryKey: BigqueryDataTransferCustomEndpointEntry,
BigtableCustomEndpointEntryKey: BigtableCustomEndpointEntry,
BinaryAuthorizationCustomEndpointEntryKey: BinaryAuthorizationCustomEndpointEntry,
CloudBuildCustomEndpointEntryKey: CloudBuildCustomEndpointEntry,
CloudSchedulerCustomEndpointEntryKey: CloudSchedulerCustomEndpointEntry,
Expand Down Expand Up @@ -221,6 +222,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
GeneratedAccessContextManagerResourcesMap,
GeneratedAppEngineResourcesMap,
GeneratedBigqueryDataTransferResourcesMap,
GeneratedBigtableResourcesMap,
GeneratedBinaryAuthorizationResourcesMap,
GeneratedCloudBuildResourcesMap,
GeneratedCloudSchedulerResourcesMap,
Expand Down Expand Up @@ -395,6 +397,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config.AccessContextManagerBasePath = d.Get(AccessContextManagerCustomEndpointEntryKey).(string)
config.AppEngineBasePath = d.Get(AppEngineCustomEndpointEntryKey).(string)
config.BigqueryDataTransferBasePath = d.Get(BigqueryDataTransferCustomEndpointEntryKey).(string)
config.BigtableBasePath = d.Get(BigtableCustomEndpointEntryKey).(string)
config.BinaryAuthorizationBasePath = d.Get(BinaryAuthorizationCustomEndpointEntryKey).(string)
config.CloudBuildBasePath = d.Get(CloudBuildCustomEndpointEntryKey).(string)
config.CloudSchedulerBasePath = d.Get(CloudSchedulerCustomEndpointEntryKey).(string)
Expand Down Expand Up @@ -454,6 +457,7 @@ func ConfigureBasePaths(c *Config) {
c.AccessContextManagerBasePath = AccessContextManagerDefaultBasePath
c.AppEngineBasePath = AppEngineDefaultBasePath
c.BigqueryDataTransferBasePath = BigqueryDataTransferDefaultBasePath
c.BigtableBasePath = BigtableDefaultBasePath
c.BinaryAuthorizationBasePath = BinaryAuthorizationDefaultBasePath
c.CloudBuildBasePath = CloudBuildDefaultBasePath
c.CloudSchedulerBasePath = CloudSchedulerDefaultBasePath
Expand Down
34 changes: 34 additions & 0 deletions google/provider_bigtable_gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Magic Modules and manual
// changes will be clobbered when the file is regenerated.
//
// Please read more about how to change this file in
// .github/CONTRIBUTING.md.
//
// ----------------------------------------------------------------------------

package google

import "github.com/hashicorp/terraform/helper/schema"

// If the base path has changed as a result of your PR, make sure to update
// the provider_reference page!
var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/"
var BigtableCustomEndpointEntryKey = "bigtable_custom_endpoint"
var BigtableCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BIGTABLE_CUSTOM_ENDPOINT",
}, BigtableDefaultBasePath),
}

var GeneratedBigtableResourcesMap = map[string]*schema.Resource{
"google_bigtable_app_profile": resourceBigtableAppProfile(),
}
Loading

0 comments on commit 3851cae

Please sign in to comment.