resourcemanager

package
v0.0.0-...-7c00c02 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MPL-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Index

Constants

This section is empty.

Variables

View Source
var (
	DataSourceGoogleServiceAccountJwtNow = time.Now
)
View Source
var IamFolderSchema = map[string]*schema.Schema{
	"folder": {
		Type:     schema.TypeString,
		Required: true,
		ForceNew: true,
	},
}
View Source
var IamOrganizationSchema = map[string]*schema.Schema{
	"org_id": {
		Type:        schema.TypeString,
		Required:    true,
		ForceNew:    true,
		Description: `The numeric ID of the organization in which you want to manage the audit logging config.`,
	},
}
View Source
var IamProjectSchema = map[string]*schema.Schema{
	"project": {
		Type:             schema.TypeString,
		Required:         true,
		ForceNew:         true,
		DiffSuppressFunc: CompareProjectName,
	},
}
View Source
var IamServiceAccountSchema = map[string]*schema.Schema{
	"service_account_id": {
		Type:         schema.TypeString,
		Required:     true,
		ForceNew:     true,
		ValidateFunc: verify.ValidateRegexp(verify.ServiceAccountLinkRegex),
	},
}
View Source
var RenamedServices = map[string]string{}

map from old -> new names of services that have been renamed these should be removed during major provider versions. comment here with "DEPRECATED FOR {{version}} next to entries slated for removal in {{version}} upon removal, we should disallow the old name from being used even if it's not gone from the underlying API yet

View Source
var (
	TestPrefix = "tf-test"
)

Functions

func BatchRequestEnableService

func BatchRequestEnableService(service string, project string, d *schema.ResourceData, config *transport_tpg.Config) error

BatchRequestEnableServices can be used to batch requests to enable services across resource nodes, i.e. to batch creation of several google_project_service(s) resources.

func BatchRequestReadServices

func BatchRequestReadServices(project string, d *schema.ResourceData, config *transport_tpg.Config) (interface{}, error)

func CanonicalFolderId

func CanonicalFolderId(folder string) string

func CanonicalOrgPolicyConstraint

func CanonicalOrgPolicyConstraint(constraint string) string

func CompareProjectName

func CompareProjectName(_, old, new string, _ *schema.ResourceData) bool

func DataSourceGoogleActiveFolder

func DataSourceGoogleActiveFolder() *schema.Resource

func DataSourceGoogleFolder

func DataSourceGoogleFolder() *schema.Resource

func DataSourceGoogleFolderOrganizationPolicy

func DataSourceGoogleFolderOrganizationPolicy() *schema.Resource

func DataSourceGoogleFolders

func DataSourceGoogleFolders() *schema.Resource

func DataSourceGoogleIamPolicy

func DataSourceGoogleIamPolicy() *schema.Resource

DataSourceGoogleIamPolicy returns a *schema.Resource that allows a customer to express a Google Cloud IAM policy in a data resource. This is an example of how the schema would be used in a config:

data "google_iam_policy" "admin" {
  binding {
    role = "roles/storage.objectViewer"
    members = [
      "user:evanbrown@google.com",
    ]
  }
}

func DataSourceGoogleIamRole

func DataSourceGoogleIamRole() *schema.Resource

func DataSourceGoogleIamTestablePermissions

func DataSourceGoogleIamTestablePermissions() *schema.Resource

func DataSourceGoogleNetblockIpRanges

func DataSourceGoogleNetblockIpRanges() *schema.Resource

func DataSourceGoogleOrganization

func DataSourceGoogleOrganization() *schema.Resource

func DataSourceGoogleProject

func DataSourceGoogleProject() *schema.Resource

func DataSourceGoogleProjectOrganizationPolicy

func DataSourceGoogleProjectOrganizationPolicy() *schema.Resource

func DataSourceGoogleProjectService

func DataSourceGoogleProjectService() *schema.Resource

func DataSourceGoogleProjects

func DataSourceGoogleProjects() *schema.Resource

func DataSourceGoogleServiceAccount

func DataSourceGoogleServiceAccount() *schema.Resource

func DataSourceGoogleServiceAccountAccessToken

func DataSourceGoogleServiceAccountAccessToken() *schema.Resource

func DataSourceGoogleServiceAccountIdToken

func DataSourceGoogleServiceAccountIdToken() *schema.Resource

func DataSourceGoogleServiceAccountJwt

func DataSourceGoogleServiceAccountJwt() *schema.Resource

func DataSourceGoogleServiceAccountKey

func DataSourceGoogleServiceAccountKey() *schema.Resource

func EnableServiceUsageProjectServices

func EnableServiceUsageProjectServices(services []string, project, billingProject, userAgent string, config *transport_tpg.Config, timeout time.Duration) error

Enables services. WARNING: Use BatchRequestEnableServices for better batching if possible.

func FolderIdParseFunc

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

func GetFolderIamPolicyByFolderName

func GetFolderIamPolicyByFolderName(folderName, userAgent string, config *transport_tpg.Config) (*cloudresourcemanager.Policy, error)

Retrieve the existing IAM Policy for a folder

func GetProjectIamPolicy

func GetProjectIamPolicy(project string, config *transport_tpg.Config) (*cloudresourcemanager.Policy, error)

Retrieve the existing IAM Policy for a Project

func ListCurrentlyEnabledServices

func ListCurrentlyEnabledServices(project, billingProject, userAgent string, config *transport_tpg.Config, timeout time.Duration) (map[string]struct{}, error)

Retrieve a project's services from the API if a service has been renamed, this function will list both the old and new forms of the service. LIST responses are expected to return only the old or new form, but we'll always return both.

func NewGoogleClientConfigDataSource

func NewGoogleClientConfigDataSource() datasource.DataSource

func NewGoogleClientOpenIDUserinfoDataSource

func NewGoogleClientOpenIDUserinfoDataSource() datasource.DataSource

func OrgIdParseFunc

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

func ParseFolderId

func ParseFolderId(v interface{}) string

func PrefixedProject

func PrefixedProject(pid string) string

func ProjectIdParseFunc

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

func ResourceBillingSubaccount

func ResourceBillingSubaccount() *schema.Resource

func ResourceGoogleFolder

func ResourceGoogleFolder() *schema.Resource

func ResourceGoogleFolderOrganizationPolicy

func ResourceGoogleFolderOrganizationPolicy() *schema.Resource

func ResourceGoogleOrganizationIamCustomRole

func ResourceGoogleOrganizationIamCustomRole() *schema.Resource

func ResourceGoogleOrganizationPolicy

func ResourceGoogleOrganizationPolicy() *schema.Resource

func ResourceGoogleProject

func ResourceGoogleProject() *schema.Resource

ResourceGoogleProject returns a *schema.Resource that allows a customer to declare a Google Cloud Project resource.

func ResourceGoogleProjectDefaultServiceAccounts

func ResourceGoogleProjectDefaultServiceAccounts() *schema.Resource

ResourceGoogleProjectDefaultServiceAccounts returns a *schema.Resource that allows a customer to manage all the default serviceAccounts. It does mean that terraform tried to perform the action in the SA at some point but does not ensure that all defaults serviceAccounts where managed. Eg.: API was activated after project creation.

func ResourceGoogleProjectIamCustomRole

func ResourceGoogleProjectIamCustomRole() *schema.Resource

func ResourceGoogleProjectOrganizationPolicy

func ResourceGoogleProjectOrganizationPolicy() *schema.Resource

func ResourceGoogleProjectService

func ResourceGoogleProjectService() *schema.Resource

func ResourceGoogleServiceAccount

func ResourceGoogleServiceAccount() *schema.Resource

func ResourceGoogleServiceAccountKey

func ResourceGoogleServiceAccountKey() *schema.Resource

func ResourceManagerOperationWaitTime

func ResourceManagerOperationWaitTime(config *transport_tpg.Config, op map[string]interface{}, activity, userAgent string, timeout time.Duration) error

func ResourceManagerOperationWaitTimeWithResponse

func ResourceManagerOperationWaitTimeWithResponse(config *transport_tpg.Config, op map[string]interface{}, response *map[string]interface{}, activity, userAgent string, timeout time.Duration) error

nolint: deadcode,unused

func ResourceResourceManagerLien

func ResourceResourceManagerLien() *schema.Resource

func ServiceAccountIdParseFunc

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

func ServiceAccountKeyWaitTime

func ServiceAccountKeyWaitTime(client *iam.ProjectsServiceAccountsKeysService, keyName, publicKeyType, activity string, timeout time.Duration) error

Types

type FolderIamUpdater

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

func (*FolderIamUpdater) DescribeResource

func (u *FolderIamUpdater) DescribeResource() string

func (*FolderIamUpdater) GetMutexKey

func (u *FolderIamUpdater) GetMutexKey() string

func (*FolderIamUpdater) GetResourceIamPolicy

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

func (*FolderIamUpdater) GetResourceId

func (u *FolderIamUpdater) GetResourceId() string

func (*FolderIamUpdater) SetResourceIamPolicy

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

type GoogleClientConfigDataSource

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

func (*GoogleClientConfigDataSource) Configure

func (*GoogleClientConfigDataSource) Metadata

func (*GoogleClientConfigDataSource) Read

func (*GoogleClientConfigDataSource) Schema

type GoogleClientConfigModel

type GoogleClientConfigModel struct {
	// Id could/should be removed in future as it's not necessary in the plugin framework
	// https://github.com/hashicorp/terraform-plugin-testing/issues/84
	Id          types.String `tfsdk:"id"`
	Project     types.String `tfsdk:"project"`
	Region      types.String `tfsdk:"region"`
	Zone        types.String `tfsdk:"zone"`
	AccessToken types.String `tfsdk:"access_token"`
}

func (*GoogleClientConfigModel) GetLocationDescription

type GoogleClientOpenIDUserinfoDataSource

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

func (*GoogleClientOpenIDUserinfoDataSource) Configure

func (*GoogleClientOpenIDUserinfoDataSource) Metadata

func (*GoogleClientOpenIDUserinfoDataSource) Read

func (*GoogleClientOpenIDUserinfoDataSource) Schema

type GoogleClientOpenIDUserinfoModel

type GoogleClientOpenIDUserinfoModel struct {
	// Id could/should be removed in future as it's not necessary in the plugin framework
	// https://github.com/hashicorp/terraform-plugin-testing/issues/84
	Id    types.String `tfsdk:"id"`
	Email types.String `tfsdk:"email"`
}

type OrganizationIamUpdater

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

func (*OrganizationIamUpdater) DescribeResource

func (u *OrganizationIamUpdater) DescribeResource() string

func (*OrganizationIamUpdater) GetMutexKey

func (u *OrganizationIamUpdater) GetMutexKey() string

func (*OrganizationIamUpdater) GetResourceIamPolicy

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

func (*OrganizationIamUpdater) GetResourceId

func (u *OrganizationIamUpdater) GetResourceId() string

func (*OrganizationIamUpdater) SetResourceIamPolicy

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

type ProjectIamUpdater

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

func (*ProjectIamUpdater) DescribeResource

func (u *ProjectIamUpdater) DescribeResource() string

func (*ProjectIamUpdater) GetMutexKey

func (u *ProjectIamUpdater) GetMutexKey() string

func (*ProjectIamUpdater) GetResourceIamPolicy

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

func (*ProjectIamUpdater) GetResourceId

func (u *ProjectIamUpdater) GetResourceId() string

func (*ProjectIamUpdater) SetResourceIamPolicy

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

type ResourceManagerOperationWaiter

type ResourceManagerOperationWaiter struct {
	Config    *transport_tpg.Config
	UserAgent string
	tpgresource.CommonOperationWaiter
}

func (*ResourceManagerOperationWaiter) QueryOp

func (w *ResourceManagerOperationWaiter) QueryOp() (interface{}, error)

type ServiceAccountIamUpdater

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

func (*ServiceAccountIamUpdater) DescribeResource

func (u *ServiceAccountIamUpdater) DescribeResource() string

func (*ServiceAccountIamUpdater) GetMutexKey

func (u *ServiceAccountIamUpdater) GetMutexKey() string

func (*ServiceAccountIamUpdater) GetResourceIamPolicy

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

func (*ServiceAccountIamUpdater) GetResourceId

func (u *ServiceAccountIamUpdater) GetResourceId() string

func (*ServiceAccountIamUpdater) SetResourceIamPolicy

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

type ServiceAccountKeyWaiter

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

func (*ServiceAccountKeyWaiter) RefreshFunc

type ServicesCall

type ServicesCall interface {
	Header() http.Header
	Do(opts ...googleapi.CallOption) (*serviceusage.Operation, error)
}

Source Files

Jump to

Keyboard shortcuts

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