Skip to content

Commit

Permalink
New resource: google_billing_budget (#1428)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored and danawillow committed Dec 3, 2019
1 parent 118bfce commit b574628
Show file tree
Hide file tree
Showing 6 changed files with 1,147 additions and 2 deletions.
3 changes: 3 additions & 0 deletions google-beta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type Config struct {
BigQueryBasePath string
BigqueryDataTransferBasePath string
BigtableBasePath string
BillingBasePath string
BinaryAuthorizationBasePath string
CloudBuildBasePath string
CloudFunctionsBasePath string
Expand Down Expand Up @@ -215,6 +216,7 @@ var AppEngineDefaultBasePath = "https://appengine.googleapis.com/v1/"
var BigQueryDefaultBasePath = "https://www.googleapis.com/bigquery/v2/"
var BigqueryDataTransferDefaultBasePath = "https://bigquerydatatransfer.googleapis.com/v1/"
var BigtableDefaultBasePath = "https://bigtableadmin.googleapis.com/v2/"
var BillingDefaultBasePath = "https://billingbudgets.googleapis.com/v1beta1/"
var BinaryAuthorizationDefaultBasePath = "https://binaryauthorization.googleapis.com/v1beta1/"
var CloudBuildDefaultBasePath = "https://cloudbuild.googleapis.com/v1/"
var CloudFunctionsDefaultBasePath = "https://cloudfunctions.googleapis.com/v1/"
Expand Down Expand Up @@ -706,6 +708,7 @@ func ConfigureBasePaths(c *Config) {
c.BigQueryBasePath = BigQueryDefaultBasePath
c.BigqueryDataTransferBasePath = BigqueryDataTransferDefaultBasePath
c.BigtableBasePath = BigtableDefaultBasePath
c.BillingBasePath = BillingDefaultBasePath
c.BinaryAuthorizationBasePath = BinaryAuthorizationDefaultBasePath
c.CloudBuildBasePath = CloudBuildDefaultBasePath
c.CloudFunctionsBasePath = CloudFunctionsDefaultBasePath
Expand Down
14 changes: 12 additions & 2 deletions google-beta/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ func Provider() terraform.ResourceProvider {
"GOOGLE_BIGTABLE_CUSTOM_ENDPOINT",
}, BigtableDefaultBasePath),
},
"billing_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BILLING_CUSTOM_ENDPOINT",
}, BillingDefaultBasePath),
},
"binary_authorization_custom_endpoint": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -489,9 +497,9 @@ func Provider() terraform.ResourceProvider {
return provider
}

// Generated resources: 102
// Generated resources: 103
// Generated IAM resources: 39
// Total generated resources: 141
// Total generated resources: 142
func ResourceMap() map[string]*schema.Resource {
resourceMap, _ := ResourceMapWithErrors()
return resourceMap
Expand All @@ -510,6 +518,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
"google_bigquery_dataset": resourceBigQueryDataset(),
"google_bigquery_data_transfer_config": resourceBigqueryDataTransferConfig(),
"google_bigtable_app_profile": resourceBigtableAppProfile(),
"google_billing_budget": resourceBillingBudget(),
"google_binary_authorization_attestor": resourceBinaryAuthorizationAttestor(),
"google_binary_authorization_attestor_iam_binding": ResourceIamBinding(BinaryAuthorizationAttestorIamSchema, BinaryAuthorizationAttestorIamUpdaterProducer, BinaryAuthorizationAttestorIdParseFunc),
"google_binary_authorization_attestor_iam_member": ResourceIamMember(BinaryAuthorizationAttestorIamSchema, BinaryAuthorizationAttestorIamUpdaterProducer, BinaryAuthorizationAttestorIdParseFunc),
Expand Down Expand Up @@ -807,6 +816,7 @@ func providerConfigure(d *schema.ResourceData, terraformVersion string) (interfa
config.BigQueryBasePath = d.Get("big_query_custom_endpoint").(string)
config.BigqueryDataTransferBasePath = d.Get("bigquery_data_transfer_custom_endpoint").(string)
config.BigtableBasePath = d.Get("bigtable_custom_endpoint").(string)
config.BillingBasePath = d.Get("billing_custom_endpoint").(string)
config.BinaryAuthorizationBasePath = d.Get("binary_authorization_custom_endpoint").(string)
config.CloudBuildBasePath = d.Get("cloud_build_custom_endpoint").(string)
config.CloudFunctionsBasePath = d.Get("cloud_functions_custom_endpoint").(string)
Expand Down
Loading

0 comments on commit b574628

Please sign in to comment.