bigquery_credential

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BigQueryResourceSchema = resource_schema.Schema{
	Description: "Bigquery credential resource",
	Attributes: 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",
		},
		"num_threads": resource_schema.Int64Attribute{
			Required:    true,
			Description: "Number of threads to use",
		},
	},
}

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"`
}

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"`
}

BigqueryCredentialResourceModel is the model for the resource

Jump to

Keyboard shortcuts

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