google

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2018 License: MPL-2.0 Imports: 71 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Copied from the official Google Cloud auto-generated client.
	ProjectRegex    = "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))"
	RegionRegex     = "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"
	SubnetworkRegex = "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?"

	SubnetworkLinkRegex = "projects/(" + ProjectRegex + ")/regions/(" + RegionRegex + ")/subnetworks/(" + SubnetworkRegex + ")$"

	RFC1035NameTemplate = "[a-z](?:[-a-z0-9]{%d,%d}[a-z0-9])"
	CloudIoTIdRegex     = "^[a-zA-Z][-a-zA-Z0-9._+~%]{2,254}$"
)
View Source
const FINGERPRINT_RETRIES = 10

Variables

View Source
var (
	AddressBaseApiVersion    = v1
	AddressVersionedFeatures = []Feature{
		{Version: v0beta, Item: "address_type", DefaultValue: addressTypeExternal},
		{Version: v0beta, Item: "subnetwork"},
	}
)
View Source
var (
	SubnetworkBaseApiVersion    = v1
	SubnetworkVersionedFeatures = []Feature{
		{Version: v0beta, Item: "secondary_ip_range"},
	}
)
View Source
var (
	// Service account name must have a length between 6 and 30.
	// The first and last characters have different restrictions, than
	// the middle characters. The middle characters length must be between
	// 4 and 28 since the first and last character are excluded.
	ServiceAccountNameRegex = fmt.Sprintf(RFC1035NameTemplate, 4, 28)

	ServiceAccountLinkRegex = "projects/" + ProjectRegex + "/serviceAccounts/" + ServiceAccountNameRegex + "@" + ProjectRegex + "\\.iam\\.gserviceaccount\\.com$"
)
View Source
var FINGERPRINT_FAIL_ERRORS = []string{"Invalid fingerprint.", "Supplied fingerprint does not match current metadata fingerprint."}
View Source
var FirewallBaseApiVersion = v1
View Source
var FirewallVersionedFeatures = []Feature{}
View Source
var GlobalForwardingRuleBaseApiVersion = v1
View Source
var GlobalForwardingRuleVersionedFeatures = []Feature{
	{Version: v0beta, Item: "labels"},
}
View Source
var IamFolderSchema = map[string]*schema.Schema{
	"folder": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var IamKmsCryptoKeySchema = map[string]*schema.Schema{
	"crypto_key_id": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var IamKmsKeyRingSchema = map[string]*schema.Schema{
	"key_ring_id": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var IamMemberBaseSchema = map[string]*schema.Schema{
	"role": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
	"member": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
	"etag": {
		Type:     schema.TypeString,
		Computed: true,
	},
}
View Source
var IamOrganizationSchema = map[string]*schema.Schema{
	"org_id": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var IamPolicyBaseSchema = map[string]*schema.Schema{
	"policy_data": {
		Type:             schema.TypeString,
		Required:         true,
		DiffSuppressFunc: jsonPolicyDiffSuppress,
		ValidateFunc:     validateIamPolicy,
	},
	"etag": {
		Type:     schema.TypeString,
		Computed: true,
	},
}
View Source
var IamProjectSchema = map[string]*schema.Schema{
	"project": {
		Type:     schema.TypeString,
		Optional: true,
		ForceNew: true,
	},
}
View Source
var IamPubsubTopicSchema = map[string]*schema.Schema{
	"topic": &schema.Schema{
		Type:             schema.TypeString,
		Required:         true,
		ForceNew:         true,
		DiffSuppressFunc: compareSelfLinkOrResourceName,
	},
}
View Source
var IamServiceAccountSchema = map[string]*schema.Schema{
	"service_account_id": &schema.Schema{
		Type:         schema.TypeString,
		Required:     true,
		ForceNew:     true,
		ValidateFunc: validateRegexp(ServiceAccountLinkRegex),
	},
}
View Source
var IamStorageBucketSchema = map[string]*schema.Schema{
	"bucket": &schema.Schema{
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var InstanceBaseApiVersion = v1
View Source
var InstanceGroupManagerBaseApiVersion = v1
View Source
var InstanceGroupManagerVersionedFeatures = []Feature{Feature{Version: v0beta, Item: "auto_healing_policies"}}
View Source
var InstanceTemplateBaseApiVersion = v1
View Source
var InstanceTemplateVersionedFeatures = []Feature{}
View Source
var InstanceVersionedFeatures = []Feature{}
View Source
var OrderedComputeApiVersions = []ComputeApiVersion{
	v0beta,
	v1,
}
View Source
var ProjectMetadataBaseApiVersion = v1
View Source
var ProjectMetadataVersionedFeatures = []Feature{}
View Source
var RegionInstanceGroupManagerBaseApiVersion = v1
View Source
var RegionInstanceGroupManagerVersionedFeatures = []Feature{Feature{Version: v0beta, Item: "auto_healing_policies"}}

Functions

func BetaMetadataUpdate added in v1.0.0

func BetaMetadataUpdate(oldMDMap map[string]interface{}, newMDMap map[string]interface{}, serverMD *computeBeta.Metadata)

Update the beta metadata (serverMD) according to the provided diff (oldMDMap v newMDMap).

func Convert added in v0.1.3

func Convert(item, out interface{}) error

Convert between two types by converting to/from JSON. Intended to switch between multiple API versions, as they are strict supersets of one another. Convert loses information about ForceSendFields and NullFields.

func ConvertSelfLinkToV1 added in v0.1.3

func ConvertSelfLinkToV1(link string) string

func CryptoIdParseFunc added in v1.5.0

func CryptoIdParseFunc(d *schema.ResourceData, _ *Config) error

func Delete added in v1.6.0

func Delete(config *Config, url string) (map[string]interface{}, error)

func FolderIdParseFunc added in v1.5.0

func FolderIdParseFunc(d *schema.ResourceData, _ *Config) error

func Get added in v1.6.0

func Get(config *Config, url string) (map[string]interface{}, error)
func GetResourceNameFromSelfLink(link string) string

func KeyRingIdParseFunc added in v1.5.0

func KeyRingIdParseFunc(d *schema.ResourceData, _ *Config) error

func MetadataRetryWrapper

func MetadataRetryWrapper(update func() error) error

Since the google compute API uses optimistic locking, there is a chance we need to resubmit our updated metadata. To do this, you need to provide an update function that attempts to submit your metadata

func MetadataUpdate

func MetadataUpdate(oldMDMap map[string]interface{}, newMDMap map[string]interface{}, serverMD *compute.Metadata)

Update the metadata (serverMD) according to the provided diff (oldMDMap v newMDMap).

func OrgIdParseFunc added in v1.5.0

func OrgIdParseFunc(d *schema.ResourceData, _ *Config) error

func Post added in v1.6.0

func Post(config *Config, url string, body map[string]interface{}) (map[string]interface{}, error)

func ProjectIdParseFunc added in v1.5.0

func ProjectIdParseFunc(d *schema.ResourceData, _ *Config) error

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

func PubsubTopicIdParseFunc added in v1.5.0

func PubsubTopicIdParseFunc(d *schema.ResourceData, _ *Config) error

func Put added in v1.6.0

func Put(config *Config, url string, body map[string]interface{}) (map[string]interface{}, error)

func ResourceIamBinding added in v1.3.0

func ResourceIamBinding(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceIamUpdaterFunc) *schema.Resource

func ResourceIamBindingWithImport added in v1.5.0

func ResourceIamBindingWithImport(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceIamUpdaterFunc, resourceIdParser resourceIdParserFunc) *schema.Resource

func ResourceIamMember added in v1.3.0

func ResourceIamMember(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceIamUpdaterFunc) *schema.Resource

func ResourceIamMemberWithImport added in v1.5.0

func ResourceIamMemberWithImport(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceIamUpdaterFunc, resourceIdParser resourceIdParserFunc) *schema.Resource

func ResourceIamPolicy added in v1.3.0

func ResourceIamPolicy(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceIamUpdaterFunc) *schema.Resource

func ResourceIamPolicyCreate added in v1.3.0

func ResourceIamPolicyCreate(newUpdaterFunc newResourceIamUpdaterFunc) schema.CreateFunc

func ResourceIamPolicyDelete added in v1.3.0

func ResourceIamPolicyDelete(newUpdaterFunc newResourceIamUpdaterFunc) schema.DeleteFunc

func ResourceIamPolicyRead added in v1.3.0

func ResourceIamPolicyRead(newUpdaterFunc newResourceIamUpdaterFunc) schema.ReadFunc

func ResourceIamPolicyUpdate added in v1.3.0

func ResourceIamPolicyUpdate(newUpdaterFunc newResourceIamUpdaterFunc) schema.UpdateFunc

func ResourceIamPolicyWithImport added in v1.5.0

func ResourceIamPolicyWithImport(parentSpecificSchema map[string]*schema.Schema, newUpdaterFunc newResourceIamUpdaterFunc, resourceIdParser resourceIdParserFunc) *schema.Resource

func ServiceAccountIdParseFunc added in v1.5.0

func ServiceAccountIdParseFunc(d *schema.ResourceData, _ *Config) error

func SignString

func SignString(toSign []byte, cfg *jwt.Config) ([]byte, error)

SignString calculates the SHA256 signature of the input string

func StoreResourceName added in v1.0.0

func StoreResourceName(resourceLink interface{}) string

Types

type BigtableClientFactory added in v0.1.2

type BigtableClientFactory struct {
	UserAgent   string
	TokenSource oauth2.TokenSource
}

func (BigtableClientFactory) NewAdminClient added in v0.1.2

func (s BigtableClientFactory) NewAdminClient(project, instance string) (*bigtable.AdminClient, error)

func (BigtableClientFactory) NewInstanceAdminClient added in v0.1.2

func (s BigtableClientFactory) NewInstanceAdminClient(project string) (*bigtable.InstanceAdminClient, error)

type CloudFunctionsOperationWaiter added in v1.5.0

type CloudFunctionsOperationWaiter struct {
	Service *cloudfunctions.Service
	Op      *cloudfunctions.Operation
}

func (*CloudFunctionsOperationWaiter) Conf added in v1.5.0

func (*CloudFunctionsOperationWaiter) RefreshFunc added in v1.5.0

type ComputeApiVersion added in v0.1.3

type ComputeApiVersion uint8

type ComputeOperationError

type ComputeOperationError compute.OperationError

ComputeOperationError wraps compute.OperationError and implements the error interface so it can be returned.

func (ComputeOperationError) Error

func (e ComputeOperationError) Error() string

type ComputeOperationWaiter

type ComputeOperationWaiter struct {
	Service *compute.Service
	Op      *compute.Operation
	Project string
}

func (*ComputeOperationWaiter) Conf

func (*ComputeOperationWaiter) RefreshFunc

type Config

type Config struct {
	Credentials string
	Project     string
	Region      string
	Zone        string
	// contains filtered or unexported fields
}

Config is the configuration structure used to instantiate the Google provider.

type ContainerOperationWaiter

type ContainerOperationWaiter struct {
	Service *container.Service
	Op      *container.Operation
	Project string
	Zone    string
}

func (*ContainerOperationWaiter) Conf

func (*ContainerOperationWaiter) RefreshFunc

type DataprocClusterOperationWaiter added in v1.2.0

type DataprocClusterOperationWaiter struct {
	Service *dataproc.Service
	Op      *dataproc.Operation
}

func (*DataprocClusterOperationWaiter) Conf added in v1.2.0

func (*DataprocClusterOperationWaiter) RefreshFunc added in v1.2.0

type DataprocJobOperationWaiter added in v1.3.0

type DataprocJobOperationWaiter struct {
	Service   *dataproc.Service
	Region    string
	ProjectId string
	JobId     string
}

func (*DataprocJobOperationWaiter) Conf added in v1.3.0

func (*DataprocJobOperationWaiter) ConfForDelete added in v1.3.0

func (*DataprocJobOperationWaiter) RefreshFunc added in v1.3.0

func (*DataprocJobOperationWaiter) RefreshFuncForDelete added in v1.3.0

func (w *DataprocJobOperationWaiter) RefreshFuncForDelete() resource.StateRefreshFunc

type DnsChangeWaiter

type DnsChangeWaiter struct {
	Service     *dns.Service
	Change      *dns.Change
	Project     string
	ManagedZone string
}

func (*DnsChangeWaiter) Conf

func (*DnsChangeWaiter) RefreshFunc

func (w *DnsChangeWaiter) RefreshFunc() resource.StateRefreshFunc

type Feature added in v0.1.3

type Feature struct {
	Version ComputeApiVersion
	// Path to the beta field.
	//
	// The feature is considered to be in-use if the field referenced by "Item" is set in the state.
	// The path can reference:
	// - a beta field at the top-level (e.g. "min_cpu_platform").
	// - a beta field nested inside a list (e.g. "network_interface.*.alias_ip_range" is considered to be
	// 		in-use if the "alias_ip_range" field is set in the state for any of the network interfaces).
	//
	// Note: beta field nested inside a SET are NOT supported at the moment.
	Item string

	// Optional, only set if your field has a default value.
	// If the value for the field is equal to the DefaultValue, we assume the beta feature is not activated.
	DefaultValue interface{}
}

A field of a resource and the version of the Compute API required to use it.

func (Feature) HasChangeBy added in v0.1.3

func (s Feature) HasChangeBy(d TerraformResourceData) bool

Returns true when a feature has been modified. This is most important when updating a resource to remove versioned feature usage; if the resource is reverting to its base version, it needs to perform a final update at the higher version in order to remove high version features.

func (Feature) InUseByDefault added in v1.1.0

func (s Feature) InUseByDefault(d TerraformResourceData) bool

Return true when a feature appears in schema and doesn't hold the default value.

func (Feature) InUseByUpdate added in v1.1.0

func (s Feature) InUseByUpdate(d TerraformResourceData) bool

type FolderIamUpdater added in v1.3.0

type FolderIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*FolderIamUpdater) DescribeResource added in v1.3.0

func (u *FolderIamUpdater) DescribeResource() string

func (*FolderIamUpdater) GetMutexKey added in v1.3.0

func (u *FolderIamUpdater) GetMutexKey() string

func (*FolderIamUpdater) GetResourceIamPolicy added in v1.3.0

func (u *FolderIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*FolderIamUpdater) GetResourceId added in v1.3.0

func (u *FolderIamUpdater) GetResourceId() string

func (*FolderIamUpdater) SetResourceIamPolicy added in v1.3.0

func (u *FolderIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type GlobalFieldValue added in v1.1.0

type GlobalFieldValue struct {
	Project string
	Name    string
	// contains filtered or unexported fields
}

func ParseHttpHealthCheckFieldValue added in v1.2.0

func ParseHttpHealthCheckFieldValue(healthCheck string, d TerraformResourceData, config *Config) (*GlobalFieldValue, error)

func ParseNetworkFieldValue added in v1.0.0

func ParseNetworkFieldValue(network string, d TerraformResourceData, config *Config) (*GlobalFieldValue, error)

func ParseSslCertificateFieldValue added in v1.1.1

func ParseSslCertificateFieldValue(sslCertificate string, d TerraformResourceData, config *Config) (*GlobalFieldValue, error)
func (f GlobalFieldValue) RelativeLink() string

type InUseFunc added in v1.1.0

type InUseFunc func(d TerraformResourceData, path string, defaultValue interface{}) bool

type KmsCryptoKeyIamUpdater added in v1.3.0

type KmsCryptoKeyIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*KmsCryptoKeyIamUpdater) DescribeResource added in v1.3.0

func (u *KmsCryptoKeyIamUpdater) DescribeResource() string

func (*KmsCryptoKeyIamUpdater) GetMutexKey added in v1.3.0

func (u *KmsCryptoKeyIamUpdater) GetMutexKey() string

func (*KmsCryptoKeyIamUpdater) GetResourceIamPolicy added in v1.3.0

func (u *KmsCryptoKeyIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*KmsCryptoKeyIamUpdater) GetResourceId added in v1.3.0

func (u *KmsCryptoKeyIamUpdater) GetResourceId() string

func (*KmsCryptoKeyIamUpdater) SetResourceIamPolicy added in v1.3.0

func (u *KmsCryptoKeyIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type KmsKeyRingIamUpdater added in v1.3.0

type KmsKeyRingIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*KmsKeyRingIamUpdater) DescribeResource added in v1.3.0

func (u *KmsKeyRingIamUpdater) DescribeResource() string

func (*KmsKeyRingIamUpdater) GetMutexKey added in v1.3.0

func (u *KmsKeyRingIamUpdater) GetMutexKey() string

func (*KmsKeyRingIamUpdater) GetResourceIamPolicy added in v1.3.0

func (u *KmsKeyRingIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*KmsKeyRingIamUpdater) GetResourceId added in v1.3.0

func (u *KmsKeyRingIamUpdater) GetResourceId() string

func (*KmsKeyRingIamUpdater) SetResourceIamPolicy added in v1.3.0

func (u *KmsKeyRingIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type LoggingSinkId added in v1.0.0

type LoggingSinkId struct {
	// contains filtered or unexported fields
}

LoggingSinkId represents the parts that make up the canonical id used within terraform for a logging resource.

type OrganizationFieldValue added in v1.3.0

type OrganizationFieldValue struct {
	OrgId string
	Name  string
	// contains filtered or unexported fields
}

func ParseOrganizationCustomRoleName added in v1.3.0

func ParseOrganizationCustomRoleName(role string) (*OrganizationFieldValue, error)
func (f OrganizationFieldValue) RelativeLink() string

type OrganizationIamUpdater added in v1.3.0

type OrganizationIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*OrganizationIamUpdater) DescribeResource added in v1.3.0

func (u *OrganizationIamUpdater) DescribeResource() string

func (*OrganizationIamUpdater) GetMutexKey added in v1.3.0

func (u *OrganizationIamUpdater) GetMutexKey() string

func (*OrganizationIamUpdater) GetResourceIamPolicy added in v1.3.0

func (u *OrganizationIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*OrganizationIamUpdater) GetResourceId added in v1.3.0

func (u *OrganizationIamUpdater) GetResourceId() string

func (*OrganizationIamUpdater) SetResourceIamPolicy added in v1.3.0

func (u *OrganizationIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type ProjectIamUpdater added in v1.3.0

type ProjectIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*ProjectIamUpdater) DescribeResource added in v1.3.0

func (u *ProjectIamUpdater) DescribeResource() string

func (*ProjectIamUpdater) GetMutexKey added in v1.3.0

func (u *ProjectIamUpdater) GetMutexKey() string

func (*ProjectIamUpdater) GetResourceIamPolicy added in v1.3.0

func (u *ProjectIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*ProjectIamUpdater) GetResourceId added in v1.3.0

func (u *ProjectIamUpdater) GetResourceId() string

func (*ProjectIamUpdater) SetResourceIamPolicy added in v1.3.0

func (u *ProjectIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type PubsubTopicIamUpdater added in v1.5.0

type PubsubTopicIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*PubsubTopicIamUpdater) DescribeResource added in v1.5.0

func (u *PubsubTopicIamUpdater) DescribeResource() string

func (*PubsubTopicIamUpdater) GetMutexKey added in v1.5.0

func (u *PubsubTopicIamUpdater) GetMutexKey() string

func (*PubsubTopicIamUpdater) GetResourceIamPolicy added in v1.5.0

func (u *PubsubTopicIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*PubsubTopicIamUpdater) GetResourceId added in v1.5.0

func (u *PubsubTopicIamUpdater) GetResourceId() string

func (*PubsubTopicIamUpdater) SetResourceIamPolicy added in v1.5.0

func (u *PubsubTopicIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type RegionalFieldValue added in v1.3.0

type RegionalFieldValue struct {
	Project string
	Region  string
	Name    string
	// contains filtered or unexported fields
}

func ParseSubnetworkFieldValue added in v1.3.0

func ParseSubnetworkFieldValue(subnetwork string, d TerraformResourceData, config *Config) (*RegionalFieldValue, error)

func ParseSubnetworkFieldValueWithProjectField added in v1.3.0

func ParseSubnetworkFieldValueWithProjectField(subnetwork, projectField string, d TerraformResourceData, config *Config) (*RegionalFieldValue, error)
func (f RegionalFieldValue) RelativeLink() string

type ResourceIamUpdater added in v1.3.0

type ResourceIamUpdater interface {
	// Fetch the existing IAM policy attached to a resource.
	GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

	// Replaces the existing IAM Policy attached to a resource.
	SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

	// A mutex guards against concurrent to call to the SetResourceIamPolicy method.
	// The mutex key should be made of the resource type and resource id.
	// For example: `iam-project-{id}`.
	GetMutexKey() string

	// Returns the unique resource identifier.
	GetResourceId() string

	// Textual description of this resource to be used in error message.
	// The description should include the unique resource identifier.
	DescribeResource() string
}

The ResourceIamUpdater interface is implemented for each GCP resource supporting IAM policy.

Implementations should keep track of the resource identifier.

func NewFolderIamUpdater added in v1.3.0

func NewFolderIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewKmsCryptoKeyIamUpdater added in v1.3.0

func NewKmsCryptoKeyIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewKmsKeyRingIamUpdater added in v1.3.0

func NewKmsKeyRingIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewOrganizationIamUpdater added in v1.3.0

func NewOrganizationIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewProjectIamUpdater added in v1.3.0

func NewProjectIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewPubsubTopicIamUpdater added in v1.5.0

func NewPubsubTopicIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewServiceAccountIamUpdater added in v1.5.0

func NewServiceAccountIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

func NewStorageBucketIamUpdater added in v1.4.0

func NewStorageBucketIamUpdater(d *schema.ResourceData, config *Config) (ResourceIamUpdater, error)

type ResourceManagerOperationWaiter

type ResourceManagerOperationWaiter struct {
	Service *cloudresourcemanager.Service
	Op      *cloudresourcemanager.Operation
}

func (*ResourceManagerOperationWaiter) Conf

func (*ResourceManagerOperationWaiter) RefreshFunc

type RoleEntity

type RoleEntity struct {
	Role   string
	Entity string
}

type ServiceAccountIamUpdater added in v1.5.0

type ServiceAccountIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*ServiceAccountIamUpdater) DescribeResource added in v1.5.0

func (u *ServiceAccountIamUpdater) DescribeResource() string

func (*ServiceAccountIamUpdater) GetMutexKey added in v1.5.0

func (u *ServiceAccountIamUpdater) GetMutexKey() string

func (*ServiceAccountIamUpdater) GetResourceIamPolicy added in v1.5.0

func (u *ServiceAccountIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*ServiceAccountIamUpdater) GetResourceId added in v1.5.0

func (u *ServiceAccountIamUpdater) GetResourceId() string

func (*ServiceAccountIamUpdater) SetResourceIamPolicy added in v1.5.0

func (u *ServiceAccountIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type ServiceAccountKeyWaiter added in v1.2.0

type ServiceAccountKeyWaiter struct {
	Service       *iam.ProjectsServiceAccountsKeysService
	PublicKeyType string
	KeyName       string
}

func (*ServiceAccountKeyWaiter) Conf added in v1.2.0

func (*ServiceAccountKeyWaiter) RefreshFunc added in v1.2.0

type ServiceManagementOperationWaiter

type ServiceManagementOperationWaiter struct {
	Service *servicemanagement.APIService
	Op      *servicemanagement.Operation
}

func (*ServiceManagementOperationWaiter) Conf

func (*ServiceManagementOperationWaiter) RefreshFunc

type SpannerDatabaseOperationWaiter added in v0.1.3

type SpannerDatabaseOperationWaiter struct {
	Service *spanner.Service
	Op      *spanner.Operation
}

func (*SpannerDatabaseOperationWaiter) Conf added in v0.1.3

func (*SpannerDatabaseOperationWaiter) RefreshFunc added in v0.1.3

type SpannerInstanceOperationWaiter added in v0.1.3

type SpannerInstanceOperationWaiter struct {
	Service *spanner.Service
	Op      *spanner.Operation
}

func (*SpannerInstanceOperationWaiter) Conf added in v0.1.3

func (*SpannerInstanceOperationWaiter) RefreshFunc added in v0.1.3

type SqlAdminOperationError

type SqlAdminOperationError sqladmin.OperationErrors

SqlAdminOperationError wraps sqladmin.OperationError and implements the error interface so it can be returned.

func (SqlAdminOperationError) Error

func (e SqlAdminOperationError) Error() string

type SqlAdminOperationWaiter

type SqlAdminOperationWaiter struct {
	Service *sqladmin.Service
	Op      *sqladmin.Operation
	Project string
}

func (*SqlAdminOperationWaiter) Conf

func (*SqlAdminOperationWaiter) RefreshFunc

type StorageBucketIamUpdater added in v1.4.0

type StorageBucketIamUpdater struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*StorageBucketIamUpdater) DescribeResource added in v1.4.0

func (u *StorageBucketIamUpdater) DescribeResource() string

func (*StorageBucketIamUpdater) GetMutexKey added in v1.4.0

func (u *StorageBucketIamUpdater) GetMutexKey() string

func (*StorageBucketIamUpdater) GetResourceIamPolicy added in v1.4.0

func (u *StorageBucketIamUpdater) GetResourceIamPolicy() (*cloudresourcemanager.Policy, error)

func (*StorageBucketIamUpdater) GetResourceId added in v1.4.0

func (u *StorageBucketIamUpdater) GetResourceId() string

func (*StorageBucketIamUpdater) SetResourceIamPolicy added in v1.4.0

func (u *StorageBucketIamUpdater) SetResourceIamPolicy(policy *cloudresourcemanager.Policy) error

type TerraformResourceData added in v0.1.3

type TerraformResourceData interface {
	HasChange(string) bool
	GetOk(string) (interface{}, bool)
}

type UrlData

type UrlData struct {
	JwtConfig   *jwt.Config
	ContentMd5  string
	ContentType string
	HttpMethod  string
	Expires     int
	HttpHeaders map[string]string
	Path        string
}

UrlData stores the values required to create a Signed Url

func (*UrlData) EncodedSignature

func (u *UrlData) EncodedSignature() (string, error)

EncodedSignature returns the Signature() after base64 encoding and url escaping

func (*UrlData) Signature

func (u *UrlData) Signature() ([]byte, error)

func (*UrlData) SignedUrl

func (u *UrlData) SignedUrl() (string, error)

SignedUrl constructs the final signed URL a client can use to retrieve storage object

func (*UrlData) SigningString

func (u *UrlData) SigningString() []byte

SigningString creates a string representation of the UrlData in a form ready for signing: see https://cloud.google.com/storage/docs/access-control/create-signed-urls-program Example output: ------------------- GET

1388534400 bucket/objectname -------------------

type ZonalFieldValue added in v1.1.1

type ZonalFieldValue struct {
	Project string
	Zone    string
	Name    string
	// contains filtered or unexported fields
}

func ParseAcceleratorFieldValue added in v1.3.0

func ParseAcceleratorFieldValue(accelerator string, d TerraformResourceData, config *Config) (*ZonalFieldValue, error)

func ParseDiskFieldValue added in v1.1.1

func ParseDiskFieldValue(disk string, d TerraformResourceData, config *Config) (*ZonalFieldValue, error)

func ParseMachineTypesFieldValue added in v1.6.0

func ParseMachineTypesFieldValue(machineType string, d TerraformResourceData, config *Config) (*ZonalFieldValue, error)
func (f ZonalFieldValue) RelativeLink() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL