providers

package
v1.53.0 Latest Latest
Warning

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

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

Documentation

Overview

Package providers contains the changes for both SDKv2 and Plugin Framework which are defined in their respective sub packages.

Note: Top level files under providers package only contains the changes that depends on both internal/providers/sdkv2 and internal/providers/pluginfw packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviderServer

func GetProviderServer(ctx context.Context, options ...ServerOption) (tfprotov6.ProviderServer, error)

GetProviderServer initializes and returns a Terraform Protocol v6 ProviderServer. The function begins by initializing the Databricks provider using the SDK plugin and then upgrades this provider to be compatible with Terraform's Protocol v6 using the v5-to-v6 upgrade mechanism. Additionally, it retrieves the Databricks provider that is implemented using the Terraform Plugin Framework. These different provider implementations are then combined using a multiplexing server, which allows multiple Protocol v6 providers to be served together. The function returns the multiplexed ProviderServer, or an error if any part of the process fails.

GetProviderServer constructs the Databricks Terraform provider server. By default, it combines the default SDKv2-based provider and the default plugin framework-based provider using muxing. The providers used by the muxed server can be overridden using ServerOptions.

Types

type ServerOption

type ServerOption interface {
	Apply(*serverOptions)
}

ServerOption is a common interface for overriding providers in GetProviderServer functino call.

func WithSdkV2Provider

func WithSdkV2Provider(sdkV2Provider *schema.Provider) ServerOption

WithSdkV2Provider allows overriding the SDKv2 provider used when creating a Terraform provider with muxing. This is typically used in acceptance test for a test step to have a custom provider override.

Directories

Path Synopsis
Package common contains the changes used by both internal/providers/sdkv2 and internal/providers/pluginfw packages.
Package common contains the changes used by both internal/providers/sdkv2 and internal/providers/pluginfw packages.
Package pluginfw contains the changes specific to the plugin framework
Package pluginfw contains the changes specific to the plugin framework
Package sdkv2 contains the changes specific to the SDKv2
Package sdkv2 contains the changes specific to the SDKv2

Jump to

Keyboard shortcuts

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