provider

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const IMPORT_SEP = ":"

import separator

Variables

This section is empty.

Functions

func New

func New(version string, clientFactory APIClientFactory) func() provider.Provider

func RecordResourceFactory

func RecordResourceFactory(m *sync.Mutex) func() resource.Resource

Types

type APIClientFactory

type APIClientFactory func(apiURL, token string, skipCertificateVerification bool) (model.DNSApiClient, error)

type RecordResource

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

RecordResource defines the implementation of Technitium DNS records

func (*RecordResource) Configure

func (*RecordResource) Create

create will complain (and fail with client error) if same record is already present (mb as a result of calling "apply" with updated config with old record already gone) so state must be manually imported to continue (could step around this, but this will contradict terraform ideology -- see below)

func (*RecordResource) Delete

func (*RecordResource) ImportState

terraform import technitium_record.new-cname domain:CNAME:_test:testing.com Not implemented for now, need to find a good way given all of the possible parameters.

func (*RecordResource) Metadata

func (*RecordResource) Read

TODO: The read function might need some caching mechanism because it is currently refetching the full record list every time.

func (*RecordResource) Schema

func (*RecordResource) Update

type TechnitiumDNSProvider

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

func (*TechnitiumDNSProvider) Configure

func (*TechnitiumDNSProvider) DataSources

func (p *TechnitiumDNSProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*TechnitiumDNSProvider) Metadata

func (*TechnitiumDNSProvider) Resources

func (p *TechnitiumDNSProvider) Resources(ctx context.Context) []func() resource.Resource

func (*TechnitiumDNSProvider) Schema

type TechnitiumDNSProviderModel

type TechnitiumDNSProviderModel struct {
	APIURL                      types.String `tfsdk:"url"`
	Token                       types.String `tfsdk:"token"`
	SkipCertificateVerification types.Bool   `tfsdk:"skip_certificate_verification"`
}

have to match schema

Jump to

Keyboard shortcuts

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