Documentation ¶
Index ¶
- func GetResourceSchema() *schema.Schema
- func NewDataSource() datasource.DataSource
- func NewResource() resource.Resource
- type DataSource
- type DataSourceModel
- type Resource
- 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) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- 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 GetResourceSchema ¶
func NewDataSource ¶
func NewDataSource() datasource.DataSource
func NewResource ¶
Types ¶
type DataSource ¶
type DataSource struct {
framework.BaseDataSource
}
func (*DataSource) Read ¶
func (r *DataSource) Read( ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse, )
type DataSourceModel ¶
type DataSourceModel struct { Search types.String `tfsdk:"search"` ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` PublicKey types.String `tfsdk:"public_key"` Fingerprint types.String `tfsdk:"fingerprint"` Created types.String `tfsdk:"created"` Updated types.String `tfsdk:"updated"` OwnerID types.String `tfsdk:"owner_id"` ProjectID types.String `tfsdk:"project_id"` }
TODO (ocobles) ideally we would embed ResourceModel instead of explicitly define all the ResourceModel fields again in DataSourceModel https://github.com/hashicorp/terraform-plugin-framework/issues/242
type Resource ¶
type Resource struct {
framework.BaseResource
}
func (*Resource) Create ¶
func (r *Resource) Create( ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse, )
func (*Resource) Delete ¶
func (r *Resource) Delete( ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse, )
func (*Resource) Read ¶
func (r *Resource) Read( ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse, )
func (*Resource) Update ¶
func (r *Resource) Update( ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse, )
type ResourceModel ¶
type ResourceModel struct { ID types.String `tfsdk:"id"` Name types.String `tfsdk:"name"` PublicKey types.String `tfsdk:"public_key"` Fingerprint types.String `tfsdk:"fingerprint"` Created types.String `tfsdk:"created"` Updated types.String `tfsdk:"updated"` OwnerID types.String `tfsdk:"owner_id"` ProjectID types.String `tfsdk:"project_id"` }
Click to show internal directories.
Click to hide internal directories.