Skip to content

Commit

Permalink
Add bigtable app profile resource
Browse files Browse the repository at this point in the history
  • Loading branch information
megan07 authored Aug 16, 2019
2 parents 0f6ff59 + 46c3c91 commit 6fe812f
Show file tree
Hide file tree
Showing 6 changed files with 778 additions and 2 deletions.
2 changes: 2 additions & 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 Expand Up @@ -195,6 +196,7 @@ type Config struct {
var AccessContextManagerDefaultBasePath = "https://accesscontextmanager.googleapis.com/v1/"
var AppEngineDefaultBasePath = "https://appengine.googleapis.com/v1/"
var BigqueryDataTransferDefaultBasePath = "https://bigquerydatatransfer.googleapis.com/v1/"
var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/"
var BinaryAuthorizationDefaultBasePath = "https://binaryauthorization.googleapis.com/v1/"
var CloudBuildDefaultBasePath = "https://cloudbuild.googleapis.com/v1/"
var CloudSchedulerDefaultBasePath = "https://cloudscheduler.googleapis.com/v1/"
Expand Down
15 changes: 13 additions & 2 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ func Provider() terraform.ResourceProvider {
"GOOGLE_BIGQUERY_DATA_TRANSFER_CUSTOM_ENDPOINT",
}, BigqueryDataTransferDefaultBasePath),
},
"bigtable_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BIGTABLE_CUSTOM_ENDPOINT",
}, BigtableDefaultBasePath),
},
"binary_authorization_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -365,9 +373,9 @@ func Provider() terraform.ResourceProvider {
}
}

// Generated resources: 69
// Generated resources: 70
// Generated IAM resources: 6
// Total generated resources: 75
// Total generated resources: 76
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand All @@ -381,6 +389,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_access_context_manager_service_perimeter": resourceAccessContextManagerServicePerimeter(),
"google_app_engine_firewall_rule": resourceAppEngineFirewallRule(),
"google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(),
"google_bigtable_app_profile": resourceBigtableAppProfile(),
"google_binary_authorization_attestor": resourceBinaryAuthorizationAttestor(),
"google_binary_authorization_policy": resourceBinaryAuthorizationPolicy(),
"google_cloudbuild_trigger": resourceCloudBuildTrigger(),
Expand Down Expand Up @@ -607,6 +616,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config.AccessContextManagerBasePath = d.Get("access_context_manager_custom_endpoint").(string)
config.AppEngineBasePath = d.Get("app_engine_custom_endpoint").(string)
config.BigqueryDataTransferBasePath = d.Get("bigquery_data_transfer_custom_endpoint").(string)
config.BigtableBasePath = d.Get("bigtable_custom_endpoint").(string)
config.BinaryAuthorizationBasePath = d.Get("binary_authorization_custom_endpoint").(string)
config.CloudBuildBasePath = d.Get("cloud_build_custom_endpoint").(string)
config.CloudSchedulerBasePath = d.Get("cloud_scheduler_custom_endpoint").(string)
Expand Down Expand Up @@ -666,6 +676,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
Loading

0 comments on commit 6fe812f

Please sign in to comment.