providers

package
v0.41.0 Latest Latest
Warning

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

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

Documentation

Overview

Package providers is a generated GoMock package.

Index

Constants

View Source
const (
	AWSProviderName = "aws"
)

Provider's config parameters need to match the values expected by Terraform https://registry.terraform.io/providers/hashicorp/aws/latest/docs

View Source
const (
	AzureProviderName = "azurerm"
)

Provider's config parameters need to match the values expected by Terraform https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs

View Source
const (
	KubernetesProviderName = "kubernetes"
)

Variables

This section is empty.

Functions

func GetRecipeProviderConfigs added in v0.31.0

func GetRecipeProviderConfigs(ctx context.Context, envConfig *recipes.Configuration, secrets map[string]recipes.SecretData) (map[string][]map[string]any, error)

GetRecipeProviderConfigs returns the Terraform provider configurations for Terraform providers specified under the RecipeConfig/Terraform/Providers section under environment configuration. The function also extracts secrets from the secrets data input and updates the provider configurations with secrets as applicable.

func GetUCPConfiguredTerraformProviders added in v0.31.0

func GetUCPConfiguredTerraformProviders(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider) map[string]Provider

GetUCPConfiguredTerraformProviders returns a map of Terraform provider names to provider config builder. These providers represent Terraform providers for which Radius generates custom provider configurations based on credentials stored with UCP and providers configured on the Radius environment. For example, the Azure subscription id is added to Azure provider config using Radius Environment's Azure provider scope.

Types

type MockProvider

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

MockProvider is a mock of Provider interface.

func NewMockProvider

func NewMockProvider(ctrl *gomock.Controller) *MockProvider

NewMockProvider creates a new mock instance.

func (*MockProvider) BuildConfig

func (m *MockProvider) BuildConfig(arg0 context.Context, arg1 *recipes.Configuration) (map[string]any, error)

BuildConfig mocks base method.

func (*MockProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockProviderBuildConfigCall added in v0.35.0

type MockProviderBuildConfigCall struct {
	*gomock.Call
}

MockProviderBuildConfigCall wrap *gomock.Call

func (*MockProviderBuildConfigCall) Do added in v0.35.0

Do rewrite *gomock.Call.Do

func (*MockProviderBuildConfigCall) DoAndReturn added in v0.35.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockProviderBuildConfigCall) Return added in v0.35.0

Return rewrite *gomock.Call.Return

type MockProviderMockRecorder

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

MockProviderMockRecorder is the mock recorder for MockProvider.

func (*MockProviderMockRecorder) BuildConfig

func (mr *MockProviderMockRecorder) BuildConfig(arg0, arg1 any) *MockProviderBuildConfigCall

BuildConfig indicates an expected call of BuildConfig.

type Provider

type Provider interface {
	// BuildConfig generates the Terraform provider configuration for the provider.
	// Returns a map of Terraform provider name to values representing the provider configuration.
	// Returns an error if the provider configuration cannot be generated.
	BuildConfig(ctx context.Context, envConfig *recipes.Configuration) (map[string]any, error)
}

Provider is an interface for generating Terraform provider configurations.

func NewAWSProvider

func NewAWSProvider(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider) Provider

NewAWSProvider creates a new AWSProvider instance.

func NewAzureProvider

func NewAzureProvider(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider) Provider

NewAzureProvider creates a new AzureProvider instance.

Jump to

Keyboard shortcuts

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