Documentation ¶
Index ¶
- Variables
- func CertDataFromAPI(ctx context.Context, x509Fields v20231101.X509Fields, ...) (types.Object, diag.Diagnostics)
- func CertInfoFromAPI(ctx context.Context, certInfo *v20231101.EndpointCertificateInfo, ...) (types.Object, diag.Diagnostics)
- func CertificateFieldListFromAPI(ctx context.Context, cfl *v20231101.CertificateFieldList, ...) (types.Object, diag.Diagnostics)
- func HookFromAPI(ctx context.Context, hook *v20231101.EndpointHook, hookPath path.Path, ...) (types.Object, diag.Diagnostics)
- func HookToAPI(ctx context.Context, hook types.Object) (*v20231101.EndpointHook, diag.Diagnostics)
- func KeyInfoFromAPI(ctx context.Context, keyInfo *v20231101.EndpointKeyInfo, ...) (types.Object, diag.Diagnostics)
- func NewCertificateDataDataSourceSchema() (schema.SingleNestedAttribute, error)
- func NewCertificateDataResourceSchema() (schema.SingleNestedAttribute, error)
- func NewCertificateInfoDataSourceSchema() (schema.SingleNestedAttribute, error)
- func NewCertificateInfoResourceSchema() (schema.SingleNestedAttribute, error)
- func NewKeyInfoDataSourceSchema() (schema.SingleNestedAttribute, error)
- func NewKeyInfoResourceSchema() (schema.SingleNestedAttribute, error)
- func NewReloadInfoDataSourceSchema() (schema.SingleNestedAttribute, error)
- func NewReloadInfoResourceSchema() (schema.SingleNestedAttribute, error)
- func NewResource() resource.Resource
- func ReloadInfoFromAPI(ctx context.Context, reloadInfo *v20231101.EndpointReloadInfo, ...) (types.Object, diag.Diagnostics)
- type CertificateDataModel
- type CertificateField
- type CertificateFieldList
- type CertificateInfoModel
- type HookModel
- type HooksModel
- type KeyInfoModel
- type Model
- type ReloadInfoModel
- 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) 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 ¶
View Source
var HookObjectType = types.ObjectType{ AttrTypes: map[string]attr.Type{ "shell": types.StringType, "before": types.ListType{ ElemType: types.StringType, }, "after": types.ListType{ ElemType: types.StringType, }, "on_error": types.ListType{ ElemType: types.StringType, }, }, }
View Source
var HooksObjectType = map[string]attr.Type{ "sign": HookObjectType, "renew": HookObjectType, }
Functions ¶
func CertDataFromAPI ¶ added in v0.5.0
func CertDataFromAPI(ctx context.Context, x509Fields v20231101.X509Fields, state utils.AttributeGetter) (types.Object, diag.Diagnostics)
func CertInfoFromAPI ¶ added in v0.5.0
func CertInfoFromAPI(ctx context.Context, certInfo *v20231101.EndpointCertificateInfo, state utils.AttributeGetter) (types.Object, diag.Diagnostics)
func CertificateFieldListFromAPI ¶ added in v0.5.0
func CertificateFieldListFromAPI(ctx context.Context, cfl *v20231101.CertificateFieldList, state utils.AttributeGetter, p path.Path) (types.Object, diag.Diagnostics)
func HookFromAPI ¶
func HookFromAPI(ctx context.Context, hook *v20231101.EndpointHook, hookPath path.Path, state utils.AttributeGetter) (types.Object, diag.Diagnostics)
func HookToAPI ¶
func HookToAPI(ctx context.Context, hook types.Object) (*v20231101.EndpointHook, diag.Diagnostics)
func KeyInfoFromAPI ¶ added in v0.5.0
func KeyInfoFromAPI(ctx context.Context, keyInfo *v20231101.EndpointKeyInfo, state utils.AttributeGetter) (types.Object, diag.Diagnostics)
func NewCertificateDataDataSourceSchema ¶ added in v0.5.0
func NewCertificateDataDataSourceSchema() (schema.SingleNestedAttribute, error)
func NewCertificateDataResourceSchema ¶ added in v0.5.0
func NewCertificateDataResourceSchema() (schema.SingleNestedAttribute, error)
func NewCertificateInfoDataSourceSchema ¶ added in v0.5.0
func NewCertificateInfoDataSourceSchema() (schema.SingleNestedAttribute, error)
func NewCertificateInfoResourceSchema ¶ added in v0.5.0
func NewCertificateInfoResourceSchema() (schema.SingleNestedAttribute, error)
func NewKeyInfoDataSourceSchema ¶ added in v0.5.0
func NewKeyInfoDataSourceSchema() (schema.SingleNestedAttribute, error)
func NewKeyInfoResourceSchema ¶ added in v0.5.0
func NewKeyInfoResourceSchema() (schema.SingleNestedAttribute, error)
func NewReloadInfoDataSourceSchema ¶ added in v0.5.0
func NewReloadInfoDataSourceSchema() (schema.SingleNestedAttribute, error)
func NewReloadInfoResourceSchema ¶ added in v0.5.0
func NewReloadInfoResourceSchema() (schema.SingleNestedAttribute, error)
func NewResource ¶
func ReloadInfoFromAPI ¶ added in v0.5.0
func ReloadInfoFromAPI(ctx context.Context, reloadInfo *v20231101.EndpointReloadInfo, state utils.AttributeGetter) (types.Object, diag.Diagnostics)
Types ¶
type CertificateDataModel ¶ added in v0.5.0
type CertificateDataModel struct { CommonName types.Object `tfsdk:"common_name"` SANs types.Object `tfsdk:"sans"` Organization types.Object `tfsdk:"organization"` OrganizationalUnit types.Object `tfsdk:"organizational_unit"` Locality types.Object `tfsdk:"locality"` Province types.Object `tfsdk:"province"` StreetAddress types.Object `tfsdk:"street_address"` PostalCode types.Object `tfsdk:"postal_code"` Country types.Object `tfsdk:"country"` }
func (CertificateDataModel) ToAPI ¶ added in v0.5.0
func (certDataModel CertificateDataModel) ToAPI(ctx context.Context) (v20231101.X509Fields, diag.Diagnostics)
type CertificateField ¶ added in v0.5.0
type CertificateFieldList ¶ added in v0.5.0
type CertificateInfoModel ¶
type CertificateInfoModel struct { Type types.String `tfsdk:"type"` CrtFile types.String `tfsdk:"crt_file"` KeyFile types.String `tfsdk:"key_file"` RootFile types.String `tfsdk:"root_file"` Duration types.String `tfsdk:"duration"` GID types.Int64 `tfsdk:"gid"` UID types.Int64 `tfsdk:"uid"` Mode types.Int64 `tfsdk:"mode"` }
func (CertificateInfoModel) ToAPI ¶
func (ci CertificateInfoModel) ToAPI() *v20231101.EndpointCertificateInfo
type HookModel ¶
type HookModel struct { Shell types.String `tfsdk:"shell"` Before types.List `tfsdk:"before"` After types.List `tfsdk:"after"` OnError types.List `tfsdk:"on_error"` }
func (*HookModel) ToAPI ¶
func (h *HookModel) ToAPI(ctx context.Context) (*v20231101.EndpointHook, diag.Diagnostics)
type HooksModel ¶
func (*HooksModel) ToAPI ¶
func (h *HooksModel) ToAPI(ctx context.Context) (*v20231101.EndpointHooks, diag.Diagnostics)
type KeyInfoModel ¶
type KeyInfoModel struct { Format types.String `tfsdk:"format"` PubFile types.String `tfsdk:"pub_file"` Type types.String `tfsdk:"type"` Protection types.String `tfsdk:"protection"` }
func (*KeyInfoModel) ToAPI ¶
func (ki *KeyInfoModel) ToAPI() *v20231101.EndpointKeyInfo
type Model ¶
type Model struct { WorkloadType types.String `tfsdk:"workload_type"` DisplayName types.String `tfsdk:"display_name"` Slug types.String `tfsdk:"slug"` DeviceCollectionSlug types.String `tfsdk:"device_collection_slug"` AuthorityID types.String `tfsdk:"authority_id"` CertificateInfo types.Object `tfsdk:"certificate_info"` KeyInfo types.Object `tfsdk:"key_info"` ReloadInfo types.Object `tfsdk:"reload_info"` Hooks types.Object `tfsdk:"hooks"` CertificateData types.Object `tfsdk:"certificate_data"` }
type ReloadInfoModel ¶
type ReloadInfoModel struct { Method types.String `tfsdk:"method"` PIDFile types.String `tfsdk:"pid_file"` Signal types.Int64 `tfsdk:"signal"` UnitName types.String `tfsdk:"unit_name"` }
func (*ReloadInfoModel) ToAPI ¶
func (ri *ReloadInfoModel) ToAPI() *v20231101.EndpointReloadInfo
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) 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.