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. Consider using `password_wo` instead, which is not stored in state.", Computed: true, Default: stringdefault.StaticString(""), Validators: []validator.String{ stringvalidator.ConflictsWith(path.MatchRoot("password_wo")), stringvalidator.PreferWriteOnlyAttribute(path.MatchRoot("password_wo")), }, }, "password_wo": resource_schema.StringAttribute{ Optional: true, WriteOnly: true, Description: "Write-only alternative to `password`. The value is not stored in state. Requires `password_wo_version` to trigger updates.", Validators: []validator.String{ stringvalidator.ConflictsWith(path.MatchRoot("password")), }, }, "password_wo_version": resource_schema.Int64Attribute{ Optional: true, Description: "Version number for `password_wo`. Increment this value to trigger an update of the password when using `password_wo`.", }, "default_schema": resource_schema.StringAttribute{ Required: true, Description: "Default schema name", Validators: []validator.String{ helper.SchemaNameValidator(), }, }, "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 ¶
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"`
PasswordWo types.String `tfsdk:"password_wo"`
PasswordWoVersion types.Int64 `tfsdk:"password_wo_version"`
DefaultSchema types.String `tfsdk:"default_schema"`
NumThreads types.Int64 `tfsdk:"num_threads"`
}
Click to show internal directories.
Click to hide internal directories.