provider

package
v0.0.0-...-1ac117a Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewCustomResourceDefinition

func NewCustomResourceDefinition() resource.Resource

func NewCustomResourceInstance

func NewCustomResourceInstance() resource.Resource

func NewExampleDataSource

func NewExampleDataSource() datasource.DataSource

Types

type CustomResourceDefinition

type CustomResourceDefinition struct {
	KubectlResource
}

CustomResourceDefinition defines the resource implementation.

func (*CustomResourceDefinition) Metadata

type CustomResourceDefinitionModel

type CustomResourceDefinitionModel struct {
	KubectlResourceModel
}

CustomResourceDefinitionModel describes the resource data model.

type CustomResourceInstance

type CustomResourceInstance struct {
	KubectlResource
}

CustomResourceInstance defines the resource implementation.

func (*CustomResourceInstance) Metadata

type CustomResourceInstanceModel

type CustomResourceInstanceModel struct {
	KubectlResourceModel
}

CustomResourceInstanceModel describes the resource data model.

type ExampleDataSource

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

ExampleDataSource defines the data source implementation.

func (*ExampleDataSource) Configure

func (*ExampleDataSource) Metadata

func (*ExampleDataSource) Read

func (*ExampleDataSource) Schema

type ExampleDataSourceModel

type ExampleDataSourceModel struct {
	ConfigurableAttribute types.String `tfsdk:"configurable_attribute"`
	Id                    types.String `tfsdk:"id"`
}

ExampleDataSourceModel describes the data source data model.

type K8sProvider

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

K8sProvider defines the provider implementation.

func (*K8sProvider) Configure

func (p *K8sProvider) Configure(ctx context.Context, request provider.ConfigureRequest, response *provider.ConfigureResponse)

Configure prepares a CRD API client for data sources and resources.

func (*K8sProvider) DataSources

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

DataSources defines the data sources implemented in the provider.

func (*K8sProvider) Metadata

func (p *K8sProvider) Metadata(ctx context.Context, request provider.MetadataRequest, response *provider.MetadataResponse)

Metadata returns the provider type name.

func (*K8sProvider) Resources

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

Resources defines the resources implemented in the provider.

func (*K8sProvider) Schema

Schema defines the provider-level schema for configuration data.

type K8sProviderConfiguration

type K8sProviderConfiguration struct {
	Host     string
	Token    string
	Username string
	Password string
}

type K8sProviderModel

type K8sProviderModel struct {
	Host     types.String `tfsdk:"host"`
	Token    types.String `tfsdk:"token"`
	Username types.String `tfsdk:"username"`
	Password types.String `tfsdk:"password"`
}

K8sProviderModel describes the provider data model.

type KubectlResource

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

func (*KubectlResource) Configure

func (*KubectlResource) Create

Create creates the resource by running kubectl apply.

func (*KubectlResource) Delete

func (*KubectlResource) ImportState

func (*KubectlResource) Read

Read does nothing really.

func (*KubectlResource) Schema

func (*KubectlResource) Update

Update re-runs kubectl apply with the whole file and relies on Kubernetes to perform all the necessary diffs.

type KubectlResourceModel

type KubectlResourceModel struct {
	Attributes types.Map    `tfsdk:"attributes"`
	Template   types.String `tfsdk:"template"`
	Applied    types.String `tfsdk:"applied"`
	Id         types.String `tfsdk:"id"`
}

Jump to

Keyboard shortcuts

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