Skip to content

Commit

Permalink
binary authorization is now ga (#3960)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored and danawillow committed Jul 17, 2019
1 parent 90f3a73 commit 9ae5c3d
Show file tree
Hide file tree
Showing 11 changed files with 1,563 additions and 3 deletions.
1 change: 1 addition & 0 deletions google/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type Config struct {
tokenSource oauth2.TokenSource

AccessContextManagerBasePath string
BinaryAuthorizationBasePath string
CloudSchedulerBasePath string
FirestoreBasePath string
MonitoringBasePath string
Expand Down
4 changes: 4 additions & 0 deletions google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func Provider() terraform.ResourceProvider {
// Generated Products
AccessContextManagerCustomEndpointEntryKey: AccessContextManagerCustomEndpointEntry,
AppEngineCustomEndpointEntryKey: AppEngineCustomEndpointEntry,
BinaryAuthorizationCustomEndpointEntryKey: BinaryAuthorizationCustomEndpointEntry,
ComputeCustomEndpointEntryKey: ComputeCustomEndpointEntry,
CloudBuildCustomEndpointEntryKey: CloudBuildCustomEndpointEntry,
CloudSchedulerCustomEndpointEntryKey: CloudSchedulerCustomEndpointEntry,
Expand Down Expand Up @@ -210,6 +211,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
return mergeResourceMaps(
GeneratedAccessContextManagerResourcesMap,
GeneratedAppEngineResourcesMap,
GeneratedBinaryAuthorizationResourcesMap,
GeneratedComputeResourcesMap,
GeneratedCloudBuildResourcesMap,
GeneratedCloudSchedulerResourcesMap,
Expand Down Expand Up @@ -382,6 +384,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config.FirestoreBasePath = d.Get(FirestoreCustomEndpointEntryKey).(string)

config.AppEngineBasePath = d.Get(AppEngineCustomEndpointEntryKey).(string)
config.BinaryAuthorizationBasePath = d.Get(BinaryAuthorizationCustomEndpointEntryKey).(string)
config.ComputeBasePath = d.Get(ComputeCustomEndpointEntryKey).(string)
config.CloudBuildBasePath = d.Get(CloudBuildCustomEndpointEntryKey).(string)
config.DnsBasePath = d.Get(DnsCustomEndpointEntryKey).(string)
Expand Down Expand Up @@ -434,6 +437,7 @@ func ConfigureBasePaths(c *Config) {
// Generated Products
c.AccessContextManagerBasePath = AccessContextManagerDefaultBasePath
c.AppEngineBasePath = AppEngineDefaultBasePath
c.BinaryAuthorizationBasePath = BinaryAuthorizationDefaultBasePath
c.ComputeBasePath = ComputeDefaultBasePath
c.CloudBuildBasePath = CloudBuildDefaultBasePath
c.CloudSchedulerBasePath = CloudSchedulerDefaultBasePath
Expand Down
35 changes: 35 additions & 0 deletions google/provider_binary_authorization_gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// ----------------------------------------------------------------------------
//
// *** 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 BinaryAuthorizationDefaultBasePath = "https://binaryauthorization.googleapis.com/v1/"
var BinaryAuthorizationCustomEndpointEntryKey = "binary_authorization_custom_endpoint"
var BinaryAuthorizationCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BINARY_AUTHORIZATION_CUSTOM_ENDPOINT",
}, BinaryAuthorizationDefaultBasePath),
}

var GeneratedBinaryAuthorizationResourcesMap = map[string]*schema.Resource{
"google_binary_authorization_attestor": resourceBinaryAuthorizationAttestor(),
"google_binary_authorization_policy": resourceBinaryAuthorizationPolicy(),
}
Loading

0 comments on commit 9ae5c3d

Please sign in to comment.