bigquery_credential

package
v1.12.7 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeServiceAccountJSON = "service-account-json"
	AuthTypeOAuthSecrets       = "oauth-secrets"
	AuthTypeExternalOAuthWIF   = "external-oauth-wif"
)

Variables

View Source
var BigQueryResourceSchema = resource_schema.Schema{
	Description: "Bigquery credential resource",
	Attributes:  resourceAttributes(),
}
View Source
var SemanticLayerAttributes = map[string]resource_schema.Attribute{
	"id": resource_schema.StringAttribute{
		Computed:    true,
		Description: "The ID of this resource. Contains the project ID and the credential ID.",
		PlanModifiers: []planmodifier.String{
			stringplanmodifier.UseStateForUnknown(),
		},
	},
	"is_active": resource_schema.BoolAttribute{
		Computed:    true,
		Optional:    true,
		Default:     booldefault.StaticBool(true),
		Description: "Whether the BigQuery credential is active",
	},
	"project_id": resource_schema.Int64Attribute{
		Required:    true,
		Description: "Project ID to create the BigQuery credential in",
		PlanModifiers: []planmodifier.Int64{
			int64planmodifier.RequiresReplace(),
		},
	},
	"credential_id": resource_schema.Int64Attribute{
		Computed:    true,
		Description: "The internal credential ID",
		PlanModifiers: []planmodifier.Int64{
			int64planmodifier.UseStateForUnknown(),
		},
	},
	"dataset": resource_schema.StringAttribute{
		Required:    true,
		Description: "Default dataset name",
		Validators: []validator.String{
			helper.SchemaNameValidator(),
		},
	},
	"num_threads": resource_schema.Int64Attribute{
		Required:    true,
		Description: "Number of threads to use",
	},
	"connection_id": resource_schema.Int64Attribute{
		Optional:    true,
		Description: "The ID of the global connection to use for this credential. When provided, the credential will automatically use the correct adapter version based on the connection's configuration (e.g., bigquery_v1 for connections with use_latest_adapter=true).",
		PlanModifiers: []planmodifier.Int64{
			int64planmodifier.RequiresReplace(),
		},
	},
}

SemanticLayerAttributes are the credential attributes shared with the Semantic Layer credential resource. The v1 WIF attributes are not part of it, as the Semantic Layer credential API does not accept them.

Functions

func BigqueryCredentialDataSource

func BigqueryCredentialDataSource() datasource.DataSource

BigqueryCredentialDataSource is a helper function to simplify the provider implementation.

func BigqueryCredentialResource

func BigqueryCredentialResource() resource.Resource

BigqueryCredentialResource is a helper function to simplify the provider implementation.

Types

type BigqueryCredentialDataSourceModel

type BigqueryCredentialDataSourceModel struct {
	ID                             types.String `tfsdk:"id"`
	CredentialID                   types.Int64  `tfsdk:"credential_id"`
	ProjectID                      types.Int64  `tfsdk:"project_id"`
	IsActive                       types.Bool   `tfsdk:"is_active"`
	Dataset                        types.String `tfsdk:"dataset"`
	NumThreads                     types.Int64  `tfsdk:"num_threads"`
	AuthType                       types.String `tfsdk:"auth_type"`
	WorkloadPoolProviderPath       types.String `tfsdk:"workload_pool_provider_path"`
	ServiceAccountImpersonationURL types.String `tfsdk:"service_account_impersonation_url"`
}

BigqueryCredentialDataSourceModel is the model for the data source

type BigqueryCredentialResourceModel

type BigqueryCredentialResourceModel struct {
	ID                             types.String `tfsdk:"id"`
	CredentialID                   types.Int64  `tfsdk:"credential_id"`
	ProjectID                      types.Int64  `tfsdk:"project_id"`
	IsActive                       types.Bool   `tfsdk:"is_active"`
	Dataset                        types.String `tfsdk:"dataset"`
	NumThreads                     types.Int64  `tfsdk:"num_threads"`
	ConnectionID                   types.Int64  `tfsdk:"connection_id"`
	AuthType                       types.String `tfsdk:"auth_type"`
	WorkloadPoolProviderPath       types.String `tfsdk:"workload_pool_provider_path"`
	ServiceAccountImpersonationURL types.String `tfsdk:"service_account_impersonation_url"`
}

BigqueryCredentialResourceModel is the model for the resource

type SemanticLayerCredentialModel added in v1.12.6

type SemanticLayerCredentialModel struct {
	ID           types.String `tfsdk:"id"`
	CredentialID types.Int64  `tfsdk:"credential_id"`
	ProjectID    types.Int64  `tfsdk:"project_id"`
	IsActive     types.Bool   `tfsdk:"is_active"`
	Dataset      types.String `tfsdk:"dataset"`
	NumThreads   types.Int64  `tfsdk:"num_threads"`
	ConnectionID types.Int64  `tfsdk:"connection_id"`
}

SemanticLayerCredentialModel is the model matching SemanticLayerAttributes

Jump to

Keyboard shortcuts

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