Documentation
¶
Index ¶
- func NewDataSource() datasource.DataSource
- func NewResource() resource.Resource
- type DataSource
- func (d *DataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type DataSourceModel
- type Resource
- func (r *Resource) Configure(_ 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, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ResourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataSource ¶
func NewDataSource() datasource.DataSource
NewDataSource is a helper function to simplify the provider implementation.
func NewResource ¶
NewResource is a helper function to simplify the provider implementation.
Types ¶
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
DataSource is the data source implementation.
func (*DataSource) Configure ¶
func (d *DataSource) Configure( _ context.Context, req datasource.ConfigureRequest, _ *datasource.ConfigureResponse, )
Configure adds the provider configured client to the data source.
func (*DataSource) Metadata ¶
func (d *DataSource) Metadata( ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse, )
Metadata sets the resource type name.
func (*DataSource) Read ¶
func (d *DataSource) Read( ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse, )
Read refreshes the Terraform state with the latest data.
func (*DataSource) Schema ¶
func (d *DataSource) Schema( ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse, )
Schema defines the schema for the data source.
type DataSourceModel ¶
type DataSourceModel struct {
ID types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Description types.String `tfsdk:"description"`
PublicKey types.String `tfsdk:"public_key"`
SiloUserID types.String `tfsdk:"silo_user_id"`
TimeCreated types.String `tfsdk:"time_created"`
TimeModified types.String `tfsdk:"time_modified"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
}
DataSourceModel are the attributes that are supported on this data source.
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource is the resource implementation.
func (*Resource) Configure ¶
func (r *Resource) Configure( _ context.Context, req resource.ConfigureRequest, _ *resource.ConfigureResponse, )
Configure adds the provider configured client to the resource.
func (*Resource) Create ¶
func (r *Resource) Create( ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, )
Create creates the resource and sets the initial Terraform state.
func (*Resource) Delete ¶
func (r *Resource) Delete( ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, )
Delete deletes the resource and removes the Terraform state on success.
func (*Resource) ImportState ¶
func (r *Resource) ImportState( ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse, )
ImportState configures the resource to be imported by its ID.
func (*Resource) Metadata ¶
func (r *Resource) Metadata( _ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse, )
Metadata sets the resource type name.
func (*Resource) Read ¶
func (r *Resource) Read( ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, )
Read refreshes the Terraform state with the latest data.
func (*Resource) Schema ¶
func (r *Resource) Schema( ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse, )
Schema defines the schema for the resource.
func (*Resource) Update ¶
func (r *Resource) Update( ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, )
Update is intentionally unimplemented since SSH keys do not have an update API. All of its configurable attributes are marked as requiring replacement to tell Terraform to destroy and create this resource upon change to its attributes. If an update API is created in the future this method should be implemented.
type ResourceModel ¶
type ResourceModel struct {
ID types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Description types.String `tfsdk:"description"`
PublicKey types.String `tfsdk:"public_key"`
SiloUserID types.String `tfsdk:"silo_user_id"`
TimeCreated types.String `tfsdk:"time_created"`
TimeModified types.String `tfsdk:"time_modified"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
}
ResourceModel are the attributes that are supported on this resource.