Documentation ¶
Index ¶
- Variables
- func New(version string) func() provider.Provider
- func NewDatabaseDataSource() datasource.DataSource
- func NewDatabaseResource() resource.Resource
- func NewDefaultRolesResource() resource.Resource
- func NewGlobalVariableResource() resource.Resource
- func NewGrantPrivilegeResource() resource.Resource
- func NewGrantRoleResource() resource.Resource
- func NewRoleResource() resource.Resource
- func NewTablesDataSource() datasource.DataSource
- func NewUserResource() resource.Resource
- type AuthOptionModel
- type DatabaseDataSource
- func (d *DatabaseDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *DatabaseDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *DatabaseDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DatabaseDataSource) Schema(_ context.Context, req datasource.SchemaRequest, ...)
- type DatabaseDataSourceModel
- type DefaultRolesResource
- func (r *DefaultRolesResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *DefaultRolesResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *DefaultRolesResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *DefaultRolesResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *DefaultRolesResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *DefaultRolesResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *DefaultRolesResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *DefaultRolesResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type DefaultRolesResourceModel
- type GlobalVariableResource
- func (r *GlobalVariableResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *GlobalVariableResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *GlobalVariableResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *GlobalVariableResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *GlobalVariableResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *GlobalVariableResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *GlobalVariableResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *GlobalVariableResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type GlobalVariableResourceModel
- type GrantPrivilege
- type GrantPrivilegeResource
- func (r *GrantPrivilegeResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *GrantPrivilegeResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *GrantPrivilegeResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *GrantPrivilegeResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *GrantPrivilegeResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *GrantPrivilegeResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *GrantPrivilegeResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *GrantPrivilegeResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type GrantPrivilegeResourceModel
- type GrantRoleResource
- func (r *GrantRoleResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *GrantRoleResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *GrantRoleResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *GrantRoleResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *GrantRoleResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *GrantRoleResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *GrantRoleResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *GrantRoleResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type GrantRoleResourceModel
- type MySQLConfiguration
- type OneConnection
- type PrivilegeLevelModel
- type PrivilegeTypeModel
- type PrivilegeTypeRaw
- type RoleModel
- type RoleModelRaw
- type RoleResource
- func (r *RoleResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *RoleResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *RoleResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *RoleResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *RoleResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *RoleResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *RoleResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *RoleResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type RoleResourceModel
- type TablesDataSource
- func (d *TablesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *TablesDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *TablesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *TablesDataSource) Schema(_ context.Context, req datasource.SchemaRequest, ...)
- type TablesDataSourceModel
- type UserModel
- type UserResource
- func (r *UserResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator
- func (r *UserResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *UserResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *UserResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *UserResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *UserResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *UserResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *UserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *UserResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type UserResourceModel
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthOptionModelTypes = map[string]attr.Type{ "plugin": types.StringType, "auth_string": types.StringType, "random_password": types.BoolType, }
View Source
var PrivlilegeTypeModelTypes = map[string]attr.Type{ "priv_type": types.StringType, "columns": types.SetType{ElemType: types.StringType}, }
View Source
var RoleTypes = map[string]attr.Type{ "name": types.StringType, "host": types.StringType, }
Functions ¶
func NewDatabaseDataSource ¶ added in v0.2.0
func NewDatabaseDataSource() datasource.DataSource
func NewDatabaseResource ¶
func NewDefaultRolesResource ¶
func NewGrantRoleResource ¶
func NewRoleResource ¶
func NewTablesDataSource ¶
func NewTablesDataSource() datasource.DataSource
func NewUserResource ¶
Types ¶
type AuthOptionModel ¶
type DatabaseDataSource ¶ added in v0.2.0
type DatabaseDataSource struct {
// contains filtered or unexported fields
}
func (*DatabaseDataSource) Configure ¶ added in v0.2.0
func (d *DatabaseDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*DatabaseDataSource) Metadata ¶ added in v0.2.0
func (d *DatabaseDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*DatabaseDataSource) Read ¶ added in v0.2.0
func (d *DatabaseDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*DatabaseDataSource) Schema ¶ added in v0.2.0
func (d *DatabaseDataSource) Schema(_ context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type DatabaseDataSourceModel ¶ added in v0.2.0
type DefaultRolesResource ¶
type DefaultRolesResource struct {
// contains filtered or unexported fields
}
DefaultRolesResource defines the resource implementation.
func (*DefaultRolesResource) Configure ¶
func (r *DefaultRolesResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*DefaultRolesResource) Create ¶
func (r *DefaultRolesResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*DefaultRolesResource) Delete ¶
func (r *DefaultRolesResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*DefaultRolesResource) ImportState ¶
func (r *DefaultRolesResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*DefaultRolesResource) Metadata ¶
func (r *DefaultRolesResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*DefaultRolesResource) Read ¶
func (r *DefaultRolesResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*DefaultRolesResource) Schema ¶
func (r *DefaultRolesResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*DefaultRolesResource) Update ¶
func (r *DefaultRolesResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type DefaultRolesResourceModel ¶
type DefaultRolesResourceModel struct { ID types.String `tfsdk:"id"` User types.String `tfsdk:"user"` Host types.String `tfsdk:"host"` DefaultRoles types.Set `tfsdk:"default_role"` }
DefaultRolesResourceModel describes the resource data model.
type GlobalVariableResource ¶
type GlobalVariableResource struct {
// contains filtered or unexported fields
}
GlobalVariableResource defines the resource implementation.
func (*GlobalVariableResource) Configure ¶
func (r *GlobalVariableResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*GlobalVariableResource) Create ¶
func (r *GlobalVariableResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*GlobalVariableResource) Delete ¶
func (r *GlobalVariableResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*GlobalVariableResource) ImportState ¶
func (r *GlobalVariableResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*GlobalVariableResource) Metadata ¶
func (r *GlobalVariableResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*GlobalVariableResource) Read ¶
func (r *GlobalVariableResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*GlobalVariableResource) Schema ¶
func (r *GlobalVariableResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*GlobalVariableResource) Update ¶
func (r *GlobalVariableResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type GlobalVariableResourceModel ¶
type GlobalVariableResourceModel struct { ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` Value types.String `tfsdk:"value"` }
GlobalVariableResourceModel describes the resource data model.
type GrantPrivilege ¶
type GrantPrivilege struct { DBName string TableName string Username string Hostname string Privileges []*ast.PrivElem GrantOption bool }
func ParseGrantPrivilegeStatement ¶
func ParseGrantPrivilegeStatement(sql string) (*GrantPrivilege, error)
func (*GrantPrivilege) Match ¶
func (v *GrantPrivilege) Match(dbName, tableName, username, hostname string) bool
func (*GrantPrivilege) PrivString ¶
func (v *GrantPrivilege) PrivString() string
type GrantPrivilegeResource ¶
type GrantPrivilegeResource struct {
// contains filtered or unexported fields
}
GrantPrivilegeResource defines the resource implementation.
func (*GrantPrivilegeResource) Configure ¶
func (r *GrantPrivilegeResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*GrantPrivilegeResource) Create ¶
func (r *GrantPrivilegeResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*GrantPrivilegeResource) Delete ¶
func (r *GrantPrivilegeResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*GrantPrivilegeResource) ImportState ¶
func (r *GrantPrivilegeResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*GrantPrivilegeResource) Metadata ¶
func (r *GrantPrivilegeResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*GrantPrivilegeResource) Read ¶
func (r *GrantPrivilegeResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*GrantPrivilegeResource) Schema ¶
func (r *GrantPrivilegeResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*GrantPrivilegeResource) Update ¶
func (r *GrantPrivilegeResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type GrantPrivilegeResourceModel ¶
type GrantPrivilegeResourceModel struct { ID types.String `tfsdk:"id"` Privileges types.Set `tfsdk:"privilege"` On types.Object `tfsdk:"on"` To types.Object `tfsdk:"to"` GrantOption types.Bool `tfsdk:"grant_option"` }
GrantPrivilegeResourceModel describes the resource data model.
type GrantRoleResource ¶
type GrantRoleResource struct {
// contains filtered or unexported fields
}
GrantRoleResource defines the resource implementation.
func (*GrantRoleResource) Configure ¶
func (r *GrantRoleResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*GrantRoleResource) Create ¶
func (r *GrantRoleResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*GrantRoleResource) Delete ¶
func (r *GrantRoleResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*GrantRoleResource) ImportState ¶
func (r *GrantRoleResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*GrantRoleResource) Metadata ¶
func (r *GrantRoleResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*GrantRoleResource) Read ¶
func (r *GrantRoleResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*GrantRoleResource) Schema ¶
func (r *GrantRoleResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*GrantRoleResource) Update ¶
func (r *GrantRoleResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type GrantRoleResourceModel ¶
type GrantRoleResourceModel struct { ID types.String `tfsdk:"id"` Roles types.Set `tfsdk:"role"` To types.Object `tfsdk:"to"` AdminOption types.Bool `tfsdk:"admin_option"` }
GrantRoleResourceModel describes the resource data model.
type MySQLConfiguration ¶
type OneConnection ¶
type PrivilegeLevelModel ¶
type PrivilegeTypeModel ¶
type PrivilegeTypeRaw ¶ added in v0.1.4
type RoleModel ¶
func NewRandomRole ¶ added in v0.1.4
type RoleModelRaw ¶ added in v0.3.0
func NewRoleRaw ¶ added in v0.3.0
func NewRoleRaw(name, host string) RoleModelRaw
type RoleResource ¶
type RoleResource struct {
// contains filtered or unexported fields
}
RoleResource defines the resource implementation.
func (*RoleResource) Configure ¶
func (r *RoleResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*RoleResource) Create ¶
func (r *RoleResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*RoleResource) Delete ¶
func (r *RoleResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*RoleResource) ImportState ¶
func (r *RoleResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*RoleResource) Metadata ¶
func (r *RoleResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*RoleResource) Read ¶
func (r *RoleResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*RoleResource) Schema ¶
func (r *RoleResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*RoleResource) Update ¶
func (r *RoleResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type RoleResourceModel ¶
type RoleResourceModel struct { ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` Host types.String `tfsdk:"host"` }
RoleResourceModel describes the resource data model.
type TablesDataSource ¶ added in v0.2.0
type TablesDataSource struct {
// contains filtered or unexported fields
}
func (*TablesDataSource) Configure ¶ added in v0.2.0
func (d *TablesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*TablesDataSource) Metadata ¶ added in v0.2.0
func (d *TablesDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*TablesDataSource) Read ¶ added in v0.2.0
func (d *TablesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*TablesDataSource) Schema ¶ added in v0.2.0
func (d *TablesDataSource) Schema(_ context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type TablesDataSourceModel ¶ added in v0.2.0
type UserModel ¶
func NewRandomUser ¶ added in v0.1.4
type UserResource ¶
type UserResource struct {
// contains filtered or unexported fields
}
UserResource defines the resource implementation.
func (*UserResource) ConfigValidators ¶
func (r *UserResource) ConfigValidators(ctx context.Context) []resource.ConfigValidator
func (*UserResource) Configure ¶
func (r *UserResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*UserResource) Create ¶
func (r *UserResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*UserResource) Delete ¶
func (r *UserResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*UserResource) ImportState ¶
func (r *UserResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*UserResource) Metadata ¶
func (r *UserResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*UserResource) Read ¶
func (r *UserResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*UserResource) Schema ¶
func (r *UserResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*UserResource) Update ¶
func (r *UserResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Click to show internal directories.
Click to hide internal directories.