webhook

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource

func NewDataSource() datasource.DataSource

func NewResource

func NewResource() resource.Resource

Types

type BasicAuthModel

type BasicAuthModel struct {
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
}

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

Configure adds the Smallstep API client to the data source.

func (*DataSource) Metadata

func (*DataSource) Read

func (*DataSource) Schema

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

Configure adds the Smallstep API client to the resource.

func (*Resource) Create

func (*Resource) Delete

func (*Resource) ImportState

func (*Resource) Metadata

func (*Resource) Read

func (*Resource) Schema

func (*Resource) Update

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL