redshift_credential

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedshiftDatasourceSchema = datasource_schema.Schema{
	Description: "Redshift credential data source",
	Attributes: map[string]datasource_schema.Attribute{
		"id": datasource_schema.StringAttribute{
			Computed:    true,
			Description: "The ID of this data source. Contains the project ID and the credential ID.",
		},
		"project_id": datasource_schema.Int64Attribute{
			Required:    true,
			Description: "Project ID",
		},
		"credential_id": datasource_schema.Int64Attribute{
			Required:    true,
			Description: "Credential ID",
		},
		"is_active": datasource_schema.BoolAttribute{
			Computed:    true,
			Description: "Whether the Redshift credential is active",
		},
		"num_threads": datasource_schema.Int64Attribute{
			Computed:    true,
			Description: "Number of threads to use",
		},
		"default_schema": datasource_schema.StringAttribute{
			Required:    true,
			Description: "Default schema name",
		},
	},
}
View Source
var RedshiftResourceSchema = resource_schema.Schema{
	Description: "Redshift 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 Redshift credential is active",
		},
		"project_id": resource_schema.Int64Attribute{
			Required:    true,
			Description: "Project ID to create the Redshift credential in",
			PlanModifiers: []planmodifier.Int64{
				int64planmodifier.RequiresReplace(),
			},
		},
		"credential_id": resource_schema.Int64Attribute{
			Computed:    true,
			Description: "The internal credential ID",
			PlanModifiers: []planmodifier.Int64{
				int64planmodifier.UseStateForUnknown(),
			},
		},

		"username": resource_schema.StringAttribute{
			Optional:    true,
			Computed:    true,
			Default:     stringdefault.StaticString("default_user"),
			Description: "The username for the Redshift account. ",
		},
		"password": resource_schema.StringAttribute{
			Optional:    true,
			Sensitive:   true,
			Description: "The password for the Redshift account",
			Computed:    true,
			Default:     stringdefault.StaticString(""),
		},
		"default_schema": resource_schema.StringAttribute{
			Required:    true,
			Description: "Default schema name",
		},
		"num_threads": resource_schema.Int64Attribute{
			Required:    true,
			Description: "Number of threads to use",
		},
	},
}

Functions

func RedshiftCredentialDataSource

func RedshiftCredentialDataSource() datasource.DataSource

RedshiftCredentialDataSource is a helper function to simplify the provider implementation.

func RedshiftCredentialResource

func RedshiftCredentialResource() resource.Resource

RedshiftCredentialResourceModel is a helper function to simplify the provider implementation.

Types

type RedshiftCredentialDataSourceModel

type RedshiftCredentialDataSourceModel struct {
	ID            types.String `tfsdk:"id"`
	CredentialID  types.Int64  `tfsdk:"credential_id"`
	ProjectID     types.Int64  `tfsdk:"project_id"`
	IsActive      types.Bool   `tfsdk:"is_active"`
	NumThreads    types.Int64  `tfsdk:"num_threads"`
	DefaultSchema types.String `tfsdk:"default_schema"`
}

type RedshiftCredentialResourceModel

type RedshiftCredentialResourceModel struct {
	ID            types.String `tfsdk:"id"`
	CredentialID  types.Int64  `tfsdk:"credential_id"`
	ProjectID     types.Int64  `tfsdk:"project_id"`
	IsActive      types.Bool   `tfsdk:"is_active"`
	Username      types.String `tfsdk:"username"`
	Password      types.String `tfsdk:"password"`
	DefaultSchema types.String `tfsdk:"default_schema"`
	NumThreads    types.Int64  `tfsdk:"num_threads"`
}

Jump to

Keyboard shortcuts

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