Documentation ¶
Index ¶
- func New(version string) func() provider.Provider
- func NewCustomResourceDefinition() resource.Resource
- func NewCustomResourceInstance() resource.Resource
- func NewExampleDataSource() datasource.DataSource
- type CustomResourceDefinition
- type CustomResourceDefinitionModel
- type CustomResourceInstance
- type CustomResourceInstanceModel
- type ExampleDataSource
- func (d *ExampleDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *ExampleDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ExampleDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ExampleDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ExampleDataSourceModel
- type K8sProvider
- func (p *K8sProvider) Configure(ctx context.Context, request provider.ConfigureRequest, ...)
- func (p *K8sProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *K8sProvider) Metadata(ctx context.Context, request provider.MetadataRequest, ...)
- func (p *K8sProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *K8sProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type K8sProviderConfiguration
- type K8sProviderModel
- type KubectlResource
- func (r *KubectlResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *KubectlResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *KubectlResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *KubectlResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *KubectlResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *KubectlResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *KubectlResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type KubectlResourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExampleDataSource ¶
func NewExampleDataSource() datasource.DataSource
Types ¶
type CustomResourceDefinition ¶
type CustomResourceDefinition struct {
KubectlResource
}
CustomResourceDefinition defines the resource implementation.
func (*CustomResourceDefinition) Metadata ¶
func (r *CustomResourceDefinition) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
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 ¶
func (r *CustomResourceInstance) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
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 (d *ExampleDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*ExampleDataSource) Metadata ¶
func (d *ExampleDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ExampleDataSource) Read ¶
func (d *ExampleDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ExampleDataSource) Schema ¶
func (d *ExampleDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 ¶
func (p *K8sProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
Schema defines the provider-level schema for configuration data.
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 (r *KubectlResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*KubectlResource) Create ¶
func (r *KubectlResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource by running kubectl apply.
func (*KubectlResource) Delete ¶
func (r *KubectlResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*KubectlResource) ImportState ¶
func (r *KubectlResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*KubectlResource) Read ¶
func (r *KubectlResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read does nothing really.
func (*KubectlResource) Schema ¶
func (r *KubectlResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*KubectlResource) Update ¶
func (r *KubectlResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Update re-runs kubectl apply with the whole file and relies on Kubernetes to perform all the necessary diffs.