keys

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TsigKeyOperationTimeout is the maximum amount of time to wait for eventual consistency
	TsigKeyOperationTimeout = 2 * time.Minute
)

Variables

View Source
var KerberosKeyAttrTypes = map[string]attr.Type{
	"algorithm":   types.StringType,
	"comment":     types.StringType,
	"domain":      types.StringType,
	"id":          types.StringType,
	"principal":   types.StringType,
	"tags":        types.MapType{ElemType: types.StringType},
	"uploaded_at": types.StringType,
	"version":     types.Int64Type,
}
View Source
var KerberosKeyResourceSchemaAttributes = map[string]schema.Attribute{
	"algorithm": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "Encryption algorithm of the key in accordance with RFC 3961.",
	},
	"comment": schema.StringAttribute{
		Optional:            true,
		MarkdownDescription: "The description for Kerberos key. May contain 0 to 1024 characters. Can include UTF-8.",
	},
	"domain": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "Kerberos realm of the principal.",
	},
	"id": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "The resource identifier.",
		PlanModifiers: []planmodifier.String{
			stringplanmodifier.UseStateForUnknown(),
		},
	},
	"principal": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "Kerberos principal associated with key.",
	},
	"tags": schema.MapAttribute{
		ElementType:         types.StringType,
		Optional:            true,
		MarkdownDescription: "The tags for the Kerberos key in JSON format.",
	},
	"uploaded_at": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "Upload time for the key.",
	},
	"version": schema.Int64Attribute{
		Computed:            true,
		MarkdownDescription: "The version number (KVNO) of the key.",
	},
}
View Source
var KeysTSIGKeyAttrTypes = map[string]attr.Type{
	"algorithm":     types.StringType,
	"comment":       types.StringType,
	"created_at":    timetypes.RFC3339Type{},
	"id":            types.StringType,
	"name":          types.StringType,
	"protocol_name": types.StringType,
	"secret":        types.StringType,
	"tags":          types.MapType{ElemType: types.StringType},
	"updated_at":    timetypes.RFC3339Type{},
}
View Source
var KeysTSIGKeyResourceSchemaAttributes = map[string]schema.Attribute{
	"algorithm": schema.StringAttribute{
		Optional: true,
		Computed: true,
		Default:  stringdefault.StaticString("hmac_sha256"),
		MarkdownDescription: "TSIG key algorithm.\n\n" +
			"  Valid values are:\n" +
			"  * _hmac_sha1_\n" +
			"  * _hmac_sha224_\n" +
			"  * _hmac_sha256_\n" +
			"  * _hmac_sha384_\n" +
			"  * _hmac_sha512_\n\n" +
			"  Defaults to _hmac_sha256_.",
		Validators: []validator.String{
			stringvalidator.OneOf("hmac_sha1", "hmac_sha224", "hmac_sha256", "hmac_sha384", "hmac_sha512"),
		},
	},
	"comment": schema.StringAttribute{
		Optional:            true,
		Computed:            true,
		Default:             stringdefault.StaticString(""),
		MarkdownDescription: "The description for the TSIG key. May contain 0 to 1024 characters. Can include UTF-8.",
	},
	"created_at": schema.StringAttribute{
		CustomType:          timetypes.RFC3339Type{},
		Computed:            true,
		MarkdownDescription: "Time when the object has been created.",
	},
	"id": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "The resource identifier.",
		PlanModifiers: []planmodifier.String{
			stringplanmodifier.UseStateForUnknown(),
		},
	},
	"name": schema.StringAttribute{
		Required:            true,
		MarkdownDescription: "The TSIG key name in the absolute domain name format.",
	},
	"protocol_name": schema.StringAttribute{
		Computed:            true,
		MarkdownDescription: "The TSIG key name supplied during a create/update operation that is converted to canonical form in punycode.",
	},
	"secret": schema.StringAttribute{
		Optional:            true,
		Computed:            true,
		Sensitive:           true,
		MarkdownDescription: "The TSIG key secret as a Base64 encoded string.",
	},
	"tags": schema.MapAttribute{
		ElementType:         types.StringType,
		Optional:            true,
		MarkdownDescription: "The tags for the TSIG key in JSON format.",
	},
	"updated_at": schema.StringAttribute{
		CustomType:          timetypes.RFC3339Type{},
		Computed:            true,
		MarkdownDescription: "Time when the object has been updated. Equals to _created_at_ if not updated after creation.",
	},
}

Functions

func ExpandKerberosKey

func ExpandKerberosKey(ctx context.Context, o types.Object, diags *diag.Diagnostics) *keys.KerberosKey

func ExpandKeysTSIGKey

func ExpandKeysTSIGKey(ctx context.Context, o types.Object, diags *diag.Diagnostics) *keys.KeysTSIGKey

func FlattenKerberosKey

func FlattenKerberosKey(ctx context.Context, from *keys.KerberosKey, diags *diag.Diagnostics) types.Object

func FlattenKeysTSIGKey

func FlattenKeysTSIGKey(ctx context.Context, from *keys.KeysTSIGKey, diags *diag.Diagnostics) types.Object

func NewKerberosDataSource

func NewKerberosDataSource() datasource.DataSource

func NewTsigDataSource

func NewTsigDataSource() datasource.DataSource

func NewTsigResource

func NewTsigResource() resource.Resource

Types

type KerberosDataSource

type KerberosDataSource struct {
	// contains filtered or unexported fields
}

KerberosDataSource defines the data source implementation.

func (*KerberosDataSource) Configure

func (*KerberosDataSource) Metadata

func (*KerberosDataSource) Read

func (*KerberosDataSource) Schema

type KerberosKeyModel

type KerberosKeyModel struct {
	Algorithm  types.String `tfsdk:"algorithm"`
	Comment    types.String `tfsdk:"comment"`
	Domain     types.String `tfsdk:"domain"`
	Id         types.String `tfsdk:"id"`
	Principal  types.String `tfsdk:"principal"`
	Tags       types.Map    `tfsdk:"tags"`
	UploadedAt types.String `tfsdk:"uploaded_at"`
	Version    types.Int64  `tfsdk:"version"`
}

func (*KerberosKeyModel) Expand

func (*KerberosKeyModel) Flatten

func (m *KerberosKeyModel) Flatten(ctx context.Context, from *keys.KerberosKey, diags *diag.Diagnostics)

type KerberosKeyModelWithFilter

type KerberosKeyModelWithFilter struct {
	Filters    types.Map  `tfsdk:"filters"`
	TagFilters types.Map  `tfsdk:"tag_filters"`
	Results    types.List `tfsdk:"results"`
}

func (*KerberosKeyModelWithFilter) FlattenResults

func (m *KerberosKeyModelWithFilter) FlattenResults(ctx context.Context, from []keys.KerberosKey, diags *diag.Diagnostics)

type KeysTSIGKeyModel

type KeysTSIGKeyModel struct {
	Algorithm    types.String      `tfsdk:"algorithm"`
	Comment      types.String      `tfsdk:"comment"`
	CreatedAt    timetypes.RFC3339 `tfsdk:"created_at"`
	Id           types.String      `tfsdk:"id"`
	Name         types.String      `tfsdk:"name"`
	ProtocolName types.String      `tfsdk:"protocol_name"`
	Secret       types.String      `tfsdk:"secret"`
	Tags         types.Map         `tfsdk:"tags"`
	UpdatedAt    timetypes.RFC3339 `tfsdk:"updated_at"`
}

func (*KeysTSIGKeyModel) Expand

func (*KeysTSIGKeyModel) Flatten

func (m *KeysTSIGKeyModel) Flatten(ctx context.Context, from *keys.KeysTSIGKey, diags *diag.Diagnostics)

type KeysTSIGKeyModelWithFilter

type KeysTSIGKeyModelWithFilter struct {
	Filters    types.Map  `tfsdk:"filters"`
	TagFilters types.Map  `tfsdk:"tag_filters"`
	Results    types.List `tfsdk:"results"`
}

func (*KeysTSIGKeyModelWithFilter) FlattenResults

func (m *KeysTSIGKeyModelWithFilter) FlattenResults(ctx context.Context, from []keys.KeysTSIGKey, diags *diag.Diagnostics)

type TsigDataSource

type TsigDataSource struct {
	// contains filtered or unexported fields
}

TsigDataSource defines the data source implementation.

func (*TsigDataSource) Configure

func (*TsigDataSource) Metadata

func (*TsigDataSource) Read

func (*TsigDataSource) Schema

type TsigResource

type TsigResource struct {
	// contains filtered or unexported fields
}

TsigResource defines the resource implementation.

func (*TsigResource) Configure

func (*TsigResource) Create

func (*TsigResource) Delete

func (*TsigResource) ImportState

func (*TsigResource) Metadata

func (*TsigResource) Read

func (*TsigResource) Schema

func (*TsigResource) Update

Jump to

Keyboard shortcuts

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