Documentation ¶
Index ¶
- func NewDataSource() datasource.DataSource
- func NewResource() resource.Resource
- type BasicAuthModel
- type DataModel
- type DataSource
- func (a *DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (a *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (a *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type Model
- type Resource
- func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (a *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (a *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(ctx 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataSource ¶
func NewDataSource() datasource.DataSource
func NewResource ¶
Types ¶
type BasicAuthModel ¶
type DataModel ¶
type DataModel struct { ID types.String `tfsdk:"id"` AuthorityID types.String `tfsdk:"authority_id"` ProvisionerID types.String `tfsdk:"provisioner_id"` Name types.String `tfsdk:"name"` Kind types.String `tfsdk:"kind"` CertType types.String `tfsdk:"cert_type"` ServerType types.String `tfsdk:"server_type"` URL types.String `tfsdk:"url"` DisableTLSClientAuth types.Bool `tfsdk:"disable_tls_client_auth"` }
Secrets and the collection_slug are never returned in read operations and won't be available in state for data source so those fields will always be empty even if the webhook was created them. The data source schema must not document those fields to avoid confusion, but the type cannot have fields not found in the schema. So for webhooks a separate model is needed for resource and data source.
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
DataSource implements data.smallstep_provisioner_webhook
func (*DataSource) Configure ¶
func (a *DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure adds the Smallstep API client to the data source.
func (*DataSource) Metadata ¶
func (a *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*DataSource) Read ¶
func (a *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*DataSource) Schema ¶
func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type Model ¶
type Model struct { ID types.String `tfsdk:"id"` AuthorityID types.String `tfsdk:"authority_id"` ProvisionerID types.String `tfsdk:"provisioner_id"` Name types.String `tfsdk:"name"` Kind types.String `tfsdk:"kind"` CertType types.String `tfsdk:"cert_type"` ServerType types.String `tfsdk:"server_type"` URL types.String `tfsdk:"url"` BearerToken types.String `tfsdk:"bearer_token"` BasicAuth *BasicAuthModel `tfsdk:"basic_auth"` DisableTLSClientAuth types.Bool `tfsdk:"disable_tls_client_auth"` CollectionSlug types.String `tfsdk:"collection_slug"` Secret types.String `tfsdk:"secret"` }
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource defines the resource implementation.
func (*Resource) Configure ¶
func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure adds the Smallstep API client to the resource.
func (*Resource) Create ¶
func (a *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*Resource) Delete ¶
func (a *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶
func (r *Resource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*Resource) Read ¶
func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*Resource) Schema ¶
func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*Resource) Update ¶
func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Click to show internal directories.
Click to hide internal directories.