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
Index ¶
- func CompileUserAgentString(ctx context.Context, name, tfVersion, provVersion string) string
- func GenerateFrameworkUserAgentString(metaData *fwmodels.ProviderMetaModel, currUserAgent string) string
- func GetBatchingConfig(ctx context.Context, data types.List, diags *diag.Diagnostics) *transport_tpg.BatchingConfig
- func GetCredentials(ctx context.Context, data fwmodels.ProviderModel, initialCredentialsOnly bool, ...) googleoauth.Credentials
- func GetCurrentUserEmailFramework(p *FrameworkProviderConfig, userAgent string, diags *diag.Diagnostics) string
- func GetRegionFromRegionSelfLink(selfLink basetypes.StringValue) basetypes.StringValue
- func GetTokenSource(ctx context.Context, data fwmodels.ProviderModel, initialCredentialsOnly bool, ...) oauth2.TokenSource
- func HandleDatasourceNotFoundError(ctx context.Context, err error, state *tfsdk.State, resource string, ...)
- func SendFrameworkRequest(p *FrameworkProviderConfig, method, project, rawurl, userAgent string, ...) (map[string]interface{}, diag.Diagnostics)
- func SendFrameworkRequestWithTimeout(p *FrameworkProviderConfig, method, project, rawurl, userAgent string, ...) (map[string]interface{}, diag.Diagnostics)
- type FrameworkProviderConfig
- func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmodels.ProviderModel, diags *diag.Diagnostics)
- func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context, data *fwmodels.ProviderModel, tfVersion string, ...)
- func (p *FrameworkProviderConfig) NewDnsClient(userAgent string, diags *diag.Diagnostics) *dns.Service
- func (p *FrameworkProviderConfig) SetupClient(ctx context.Context, data fwmodels.ProviderModel, diags *diag.Diagnostics)
- func (p *FrameworkProviderConfig) SetupGrpcLogging()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileUserAgentString ¶
func GenerateFrameworkUserAgentString ¶
func GenerateFrameworkUserAgentString(metaData *fwmodels.ProviderMetaModel, currUserAgent string) string
func GetBatchingConfig ¶
func GetBatchingConfig(ctx context.Context, data types.List, diags *diag.Diagnostics) *transport_tpg.BatchingConfig
GetBatchingConfig returns the batching config object given the provider configuration set for batching
func GetCredentials ¶
func GetCredentials(ctx context.Context, data fwmodels.ProviderModel, initialCredentialsOnly bool, diags *diag.Diagnostics) googleoauth.Credentials
GetCredentials gets credentials with a given scope (clientScopes). If initialCredentialsOnly is true, don't follow the impersonation settings and return the initial set of creds instead.
func GetCurrentUserEmailFramework ¶
func GetCurrentUserEmailFramework(p *FrameworkProviderConfig, userAgent string, diags *diag.Diagnostics) string
func GetRegionFromRegionSelfLink ¶
func GetRegionFromRegionSelfLink(selfLink basetypes.StringValue) basetypes.StringValue
func GetTokenSource ¶
func GetTokenSource(ctx context.Context, data fwmodels.ProviderModel, initialCredentialsOnly bool, diags *diag.Diagnostics) oauth2.TokenSource
GetTokenSource gets token source based on the Google Credentials configured. If initialCredentialsOnly is true, don't follow the impersonation settings and return the initial set of creds.
func SendFrameworkRequest ¶
func SendFrameworkRequest(p *FrameworkProviderConfig, method, project, rawurl, userAgent string, body map[string]interface{}, errorRetryPredicates ...transport_tpg.RetryErrorPredicateFunc) (map[string]interface{}, diag.Diagnostics)
func SendFrameworkRequestWithTimeout ¶
func SendFrameworkRequestWithTimeout(p *FrameworkProviderConfig, method, project, rawurl, userAgent string, body map[string]interface{}, timeout time.Duration, errorRetryPredicates ...transport_tpg.RetryErrorPredicateFunc) (map[string]interface{}, diag.Diagnostics)
Types ¶
type FrameworkProviderConfig ¶
type FrameworkProviderConfig struct { BillingProject types.String Client *http.Client Context context.Context PollInterval time.Duration Project types.String Region types.String Zone types.String RequestBatcherIam *transport_tpg.RequestBatcher RequestBatcherServiceUsage *transport_tpg.RequestBatcher Scopes types.List TokenSource oauth2.TokenSource UniverseDomain types.String UserAgent string UserProjectOverride types.Bool // paths for client setup AccessApprovalBasePath string AccessContextManagerBasePath string ActiveDirectoryBasePath string AlloydbBasePath string ApigeeBasePath string AppEngineBasePath string ApphubBasePath string ArtifactRegistryBasePath string BeyondcorpBasePath string BiglakeBasePath string BigQueryBasePath string BigqueryAnalyticsHubBasePath string BigqueryConnectionBasePath string BigqueryDatapolicyBasePath string BigqueryDataTransferBasePath string BigqueryReservationBasePath string BigtableBasePath string BillingBasePath string BinaryAuthorizationBasePath string BlockchainNodeEngineBasePath string CertificateManagerBasePath string CloudAssetBasePath string CloudBuildBasePath string Cloudbuildv2BasePath string ClouddeployBasePath string ClouddomainsBasePath string CloudFunctionsBasePath string Cloudfunctions2BasePath string CloudIdentityBasePath string CloudIdsBasePath string CloudRunBasePath string CloudRunV2BasePath string CloudSchedulerBasePath string CloudTasksBasePath string ComputeBasePath string ContainerAnalysisBasePath string ContainerAttachedBasePath string CoreBillingBasePath string DatabaseMigrationServiceBasePath string DataCatalogBasePath string DataFusionBasePath string DataLossPreventionBasePath string DataPipelineBasePath string DataplexBasePath string DataprocBasePath string DataprocMetastoreBasePath string DatastoreBasePath string DatastreamBasePath string DeploymentManagerBasePath string DialogflowBasePath string DialogflowCXBasePath string DiscoveryEngineBasePath string DNSBasePath string DocumentAIBasePath string DocumentAIWarehouseBasePath string EdgecontainerBasePath string EdgenetworkBasePath string EssentialContactsBasePath string FilestoreBasePath string FirebaseAppCheckBasePath string FirestoreBasePath string GKEBackupBasePath string GKEHubBasePath string GKEHub2BasePath string GkeonpremBasePath string HealthcareBasePath string IAM2BasePath string IAMBetaBasePath string IAMWorkforcePoolBasePath string IapBasePath string IdentityPlatformBasePath string IntegrationConnectorsBasePath string KMSBasePath string LoggingBasePath string LookerBasePath string MemcacheBasePath string MigrationCenterBasePath string MLEngineBasePath string MonitoringBasePath string NetappBasePath string NetworkConnectivityBasePath string NetworkManagementBasePath string NetworkSecurityBasePath string NetworkServicesBasePath string NotebooksBasePath string OrgPolicyBasePath string OSConfigBasePath string OSLoginBasePath string PrivatecaBasePath string PublicCABasePath string PubsubBasePath string PubsubLiteBasePath string RedisBasePath string ResourceManagerBasePath string SecretManagerBasePath string SecureSourceManagerBasePath string SecurityCenterBasePath string SecuritypostureBasePath string ServiceManagementBasePath string ServiceUsageBasePath string SourceRepoBasePath string SpannerBasePath string SQLBasePath string StorageBasePath string StorageInsightsBasePath string StorageTransferBasePath string TagsBasePath string TPUBasePath string VertexAIBasePath string VmwareengineBasePath string VPCAccessBasePath string WorkbenchBasePath string WorkflowsBasePath string // contains filtered or unexported fields }
func (*FrameworkProviderConfig) HandleDefaults ¶
func (p *FrameworkProviderConfig) HandleDefaults(ctx context.Context, data *fwmodels.ProviderModel, diags *diag.Diagnostics)
HandleDefaults will handle all the defaults necessary in the provider
func (*FrameworkProviderConfig) LoadAndValidateFramework ¶
func (p *FrameworkProviderConfig) LoadAndValidateFramework(ctx context.Context, data *fwmodels.ProviderModel, tfVersion string, diags *diag.Diagnostics, providerversion string)
LoadAndValidateFramework handles the bulk of configuring the provider it is pulled out so that we can manually call this from our testing provider as well
func (*FrameworkProviderConfig) NewDnsClient ¶
func (p *FrameworkProviderConfig) NewDnsClient(userAgent string, diags *diag.Diagnostics) *dns.Service
func (*FrameworkProviderConfig) SetupClient ¶
func (p *FrameworkProviderConfig) SetupClient(ctx context.Context, data fwmodels.ProviderModel, diags *diag.Diagnostics)
func (*FrameworkProviderConfig) SetupGrpcLogging ¶
func (p *FrameworkProviderConfig) SetupGrpcLogging()