Documentation ¶
Index ¶
- func New() resource.Resource
- type Instance
- type Resource
- func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type Storage
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Instance ¶
type Instance struct { ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` ProjectID types.String `tfsdk:"project_id"` Type types.String `tfsdk:"type"` MachineType types.String `tfsdk:"machine_type"` // aka FlavorID Version types.String `tfsdk:"version"` Replicas types.Int64 `tfsdk:"replicas"` BackupSchedule types.String `tfsdk:"backup_schedule"` Options map[string]string `tfsdk:"options"` Labels map[string]string `tfsdk:"labels"` ACL types.List `tfsdk:"acl"` Storage types.Object `tfsdk:"storage"` User types.Object `tfsdk:"user"` }
Instance is the schema model
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource is the exported resource
func (*Resource) Configure ¶
func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure the resource client
func (Resource) Create ¶
func (r Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create - lifecycle function
func (Resource) Delete ¶
func (r Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete - lifecycle function
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
ImportState handles terraform import
func (*Resource) Metadata ¶
func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, res *resource.MetadataResponse)
Metadata returns data resource metadata
func (Resource) Read ¶
func (r Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read - lifecycle function
func (*Resource) Schema ¶ added in v1.9.0
func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
Schema returns the terraform schema structure
func (Resource) Update ¶
func (r Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update - lifecycle function
type User ¶
type User struct { ID types.String `tfsdk:"id"` Password types.String `tfsdk:"password"` Username types.String `tfsdk:"username"` Database types.String `tfsdk:"database"` Host types.String `tfsdk:"host"` Port types.Int64 `tfsdk:"port"` URI types.String `tfsdk:"uri"` Roles types.List `tfsdk:"roles"` }
User represent database user
Click to show internal directories.
Click to hide internal directories.